Thread: Displaying a picture on a dialog

  1. #1
    Kiss the monkey. CodeMonkey's Avatar
    Join Date
    Sep 2001
    Posts
    937

    Displaying a picture on a dialog

    In MSVC++6, what would I use to display an object on a dialog (which is the program) that displays picture files. I would need to be able to change what file it is displaying. (it's a picture viewer, folks).
    "If you tell the truth, you don't have to remember anything"
    -Mark Twain

  2. #2
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    Try LoadImage() in MSVC v6. In windows only bitmaps can be used. Other image formats can be used but need other libraries. try a search for other threads on this topic to find links to these libraries. ie GDI
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  3. #3
    Registered User
    Join Date
    Aug 2001
    Posts
    223

    Loading a bitmap to a dialog

    look in the help files for reference to this function.....

    HANDLE LoadImage(
    HINSTANCE hinst, // handle of the instance containing the image
    LPCTSTR lpszName, // name or identifier of image
    UINT uType, // type of image
    int cxDesired, // desired width
    int cyDesired, // desired height
    UINT fuLoad // load flags
    );

    LR_LOADFROMFILE ...use this flag to load from file....

    ..............
    there is a previous post about 2 weeks old or younger where a kid posted a demo.... of how to do this through the api,.....
    I am going to try it and post it if I accomplish it....
    zMan

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. make Child Dialog not Popup?
    By Zeusbwr in forum Windows Programming
    Replies: 5
    Last Post: 04-08-2005, 02:42 PM
  2. Displaying strings in a dialog window
    By Frandy in forum Windows Programming
    Replies: 11
    Last Post: 09-27-2004, 08:46 AM
  3. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM
  4. Displaying bitmaps on a dialog
    By minesweeper in forum Windows Programming
    Replies: 2
    Last Post: 05-15-2002, 03:11 PM
  5. Loading a .bmp and displaying into a dialog?
    By Unregistered in forum C++ Programming
    Replies: 3
    Last Post: 01-30-2002, 12:49 PM