Thread: help

  1. #1
    Registered User
    Join Date
    Oct 2003


    Dear All,
    how to show an image on dialog in MFC?below the image, i want to add a command button called "Next" to let the program continues, how to do that?i think it is simple, but i am the new user, and don't know how to do that.Thank you

  2. #2
    train spotter
    Join Date
    Aug 2001
    near a computer
    >>how to show an image on dialog in MFC?
    Under projects add a new resource, the dialog. Add a class for this dialog by double clicking on it.

    Now insert the image into the project as a resource (must be a bitmap). Give the bitmap an ID (default will be IDB_BITMAP1)

    Add a picture control to the dialog. Drag the control onto your dialog from the 'resource tool kit' window. Edit its properties by selecting it and right clicking, bottom option is 'Properties'.
    Change the picture controls 'Type' to 'bitmap'. Now the 'Image' line is active (not grey). Select and choose the bitmap. You should be given a list of all bitmaps in the programs resources. Select the one you want (IDB_BITMAP1)

    Thats it.

    >>i want to add a command button called "Next" to let the program continues, how to do that?

    drag a button onto the dialog. Change its text, ID and style under the properties.

    highlight and double click. This will add a handler for the button being clicked.

    >>below the image

    the button can be in the image and the button will (should show through).

    Post any problems inc code.

    Good Luck!
    "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

Popular pages Recent additions subscribe to a feed