Re: Setting a button image - Help Please
- Posted by martin.stachon at worldonline.cz Jul 31, 2001
- 384 views
> > Hi all, > I am using WIN32LIB and I would like to know if it is possible to > set/change a buttons image after it has been created. > In WIN32Help I found the following but do not understand how to use it. > > -- Cut WIN32Help > > BM_SETIMAGE > wParam = 0; // not used, must be zero > lParam = (LPARAM) (HANDLE) hImage; // handle of the image > > > An application sends a BM_SETIMAGE message to associate a new image (icon > or bitmap) with the button. > > Parameters > > hImage > > Value of lParam. Identifies the image to associate with the button. > > Return Value > > The return value is the handle of the image previously associated with the > button, if any; otherwise, it is NULL. > > Regards > Tony Steward Hi, Tony use this code : sendMessange(control_id, BM_SETIMAGE, 0, handle) where handle can be for example atom handle -- load the bitmap handle= loadBitmapFromFile( "graphic.bmp" ) Regards, Martin