Thread: Refreshing images

  1. #1
    george7378
    Guest

    Refreshing images

    Hi everyone,

    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:

    Code:
    				case IDC_SUN:
    					{
    					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);
    				break;
    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?

    Thanks.

  2. #2
    george7378
    Guest
    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:

    Bitmap:

    Code:
    LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
    IDB_SUNPIC        BITMAP         "C:\\Documents and Settings\\XP\\My Documents\\latest.bmp"
    Frame:

    Code:
        CONTROL         IDB_SUNPIC, IDC_SUNFRAME, WC_STATIC, SS_BITMAP, 30, 12, 341, 236

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Images
    By _Nate_ in forum C Programming
    Replies: 4
    Last Post: 05-18-2008, 10:50 PM
  2. CBitmap + big images = bad?
    By dug in forum Windows Programming
    Replies: 18
    Last Post: 06-28-2003, 11:53 PM
  3. Images
    By gvector1 in forum C++ Programming
    Replies: 7
    Last Post: 02-25-2003, 09:59 AM
  4. STL, Queues And Images
    By simly01 in forum C++ Programming
    Replies: 3
    Last Post: 06-24-2002, 12:31 PM
  5. A simple question on Images....
    By LonelyPlanetWa in forum C Programming
    Replies: 7
    Last Post: 05-20-2002, 07:34 AM