I'm looking for advise on how to update/refresh a Bitmap created from a file that is a part of my GUI layout. Specifically I have a Bitmap in my GUI that is created from a file (Implemented and works). I want to change the contents of the file (using the same filename) the Bitmap uses then have the Bitmap re-created using that file and reder it, replacing the existing Bitmap picture.
After reviewing the AutoDocs I'm guessing what I need to do is create my GUI with the Bitmap contained in it's own layout and save the layout pointer (already done). Then when the user clicks a button gadget I update the file to the new picture. After the file update I'm guessing I need to us the LM_MODIFYCHILD method on the layer, then call RethinkLayout on the layer to refresh it and render it. Does this approach re-create the Bitmap object? Will this work? Is this the best approach or is there a better way to do it?
Example code is always helpful.