I have made a program which downlaods an image from a certain URL when it is run, and deposits it in My Documents. I have then made a dailog box to display it in. The image downloads OK, and it is desposited in the My Documents folder, but when I open the window to display it, the old version is displayed, despite the fact that I have downloaded and displayed the latest image from the URL.
Here is the code, which is set to download the image and then display it:
It just seems to pull the last image from its memory, even though the actual image in My Documents has changed. How do I refresh it to display the image after I have made changes?
HRESULT hr = URLDownloadToFile ( NULL, _T("http://georgek.heliohost.org/Asteroid.bmp"), _T("c:/Documents and Settings/XP/My Documents/latest.bmp"), 0, NULL );
DialogBox(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_SUNPAGE), hwnd, ToolDlgProc);
It seems as though the program is just using one image and keeping that one in its memory, even if I change the actual file. How do I get the frame to import the new image on command? Is it the resource?
Here are the resource files for the bitmap and the frame:
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDB_SUNPIC BITMAP "C:\\Documents and Settings\\XP\\My Documents\\latest.bmp"
CONTROL IDB_SUNPIC, IDC_SUNFRAME, WC_STATIC, SS_BITMAP, 30, 12, 341, 236