Displaying a bmp file that is being changed
I hit a wall once again!. I have an application that performs some calculation and creates as a result a bmp file, then displays this result as a pop-up window (in a dialog box) that appears after pressing a button located in the main window.
Then, if I changed the parameters for the calculation the application creates a new bmp file; but If I press the button again the resultant image is always the first one to be loaded, i.e. the display does not updates itself even though the file has changed.
I did the implementation of the displaying of the image inside the WM_ERASEBKGND case of the dialog box procedure, using the LoadBitmap function. I do the cleaning and freeing of the Device context properly.
The question is, why is this happening? How can I make the reading and displaying of the image responding in real time to the changes in the bmp file?
Thanks a lot.