flyakite
31st December 2003 05:42 UTC
Pop-up a picture on mouseover?
Okay here is what I am trying to accomplish. In the Components page I would like to have a picture displayed on mouse-over of each section/sub-section.
I would like the picture to either pop-up or to have it displayed on the left of the components where it says "Or, select the optional components you wish to install:", but that would require modifying the MUI of that page, and I'm not sure how I would add a control for the image or access it.
Vytautas
31st December 2003 05:56 UTC
Yes you would have to modify the MUI file using a resource hacker of some description. There are countless such programs available and some are better at certain tasks than others.
As an example of how this can be accomplished check out my MUI Mod page on the archive. It was modified to display pictures while the files are being installed. It has a script included which shows how to get the images to display.
Vytautas.
flyakite
31st December 2003 07:37 UTC
Right, but what I want is on section mouse-over for there to be an image displayed either in a pop-up or to the left of the components selection window. I have no idea what the code is to detect what section the mouse is over, as I have never seen it discussed before.
Joost Verburg
31st December 2003 11:30 UTC
The is a normal callback function for mouseover.
The MUI already uses it for descriptions, so you can insert your code after interting the macro MUI_FUNCTION_DESCRIPTION_BEGIN.
$0 will contain the section ID.
Joel
31st December 2003 16:28 UTC
Ok. That's a cool API test.
I'm guessing, with system plugin, since you have the ID of every component of list box (C++ terms), you will need LoadImage API and insert it in the control ID of components page.
But, hey....it's possible, didn't try it...but I will :)
flyakite
2nd January 2004 06:29 UTC
Okay I need help please.
I modified modern_smalldesc.exe. I changed control 1022 in resource 104 to SS_BITMAP. Ever since then however I've been stuck, lol. I've tried a ton of different things from this forum and the help files. I got the image switching to work on mouseover with a branding image, but I want it to work for that particular dialog ID.
Can anyone tell me the exact code I would need after
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
to get it to work? I just need one example, then I can add it for the extra sections.
I just need example code that would change the area in that dialog, ID# 1022 on mouseover for the first section. I don't fully understand all this HWND, STM_IMAGE, etc. coding so I'd really appreciate it if someone could give me a little hand.
Thanks for the help and for an amazing installer system,
Chris
kichik
2nd January 2004 12:13 UTC
You have a full working example in Vytautas' code. Only instead of 1202 it sets 2000. You don't need to put that code in MUI_FUNCTION_DESCRIPTION_BEGIN. Just adding the .onMouseOverSection function will do the same and confuse a bit less.
Function .onMouseOverSection
# Vytautas' code...
FunctionEnd