Click to See Complete Forum and Search --> : Dialog box manipulation...
linolium
Mar 7th, 2002, 09:30 AM
Hi, I have a dialog box I designed with a "Picture Control" that has a picture in it. I want to know if there is a function or a message that will change what image is in the control. Is this possible?
CornedBee
Mar 7th, 2002, 11:21 AM
Depending on what kind of control that is, you can look it up in the help.
Usually pictures are displayed in static controls. You can set the image of a static control with the STM_SETIMAGE message.
linolium
Mar 7th, 2002, 05:08 PM
would something like this work?
SendMessage(hwnd,STM_SETIMAGE,IDC_IMAGE,IDB_MYIMAGE);
CornedBee
Mar 8th, 2002, 11:27 AM
No, this would work:
SendDlgItemMessage(hDlg, IDC_IMAGE, STM_SETIMAGE, IMAGE_BITMAP, (LPARAM)hBitmap);
You get the hBitmap from a previous call to LoadImage or LoadBitmap or other functions that return a HBITMAP.
linolium
Mar 8th, 2002, 07:29 PM
ah thank you very much :)
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.