Archive: Change bitmap on a custom page in realtime


Change bitmap on a custom page in realtime
I want to change a bitmap control on a installoptions page when the user select a new value in listbox.

I've searched through the forum, found how to use the NOTIFY flag, and also the Vytautas modification of the MUI and the DisplayImage macro, but I don't understand how to use it in my case, and I 've not found real good explanations about this.

Maybe I just need to get the HWND of the window and send a windows message to 'refresh' it ? anyone can help me ?


To change an image in a bitmap control you need to get its HWND, load a bitmap using the LoadImage API function (using the System plug-in, as shown in the example you refered to) and send STM_SETIMAGE to the control to set the image (again, as in the example).


Ok, it works :up: !

But I still don't know how :)

for example when I do : 'System::Call '${sysLoadImage} (0, s, ${IMAGE_BITMAP}, 0, 0, 0x2000|0x0010) .r6' "$PLUGINSDIR\simple.bmp"', I don't know what ${IMAGE_BITMAP} represents(='0' ???)

and in :
'SendMessage $0 ${STM_SETIMAGE} ${IMAGE_BITMAP} $6' , I don't know what's the use of the last parameter ($6).

Anyway it works, thanks :D


For the vaules of defined values, look up their definition. $6 is the bitmap handle as supplied by the LoadImage call.


Thanks kichik ;)