Archive: [nsDialogs]Displaying cursor over button/moving link control


[nsDialogs]Displaying cursor over button/moving link control
  Hello,
Have a few problems with nsDialogs. I hope You can help me.
1. I want to create a Button control with Bitmap. This button must be clickable and display 'Hand' cursor (like in links).
This is how I create button with image on it.


    File /oname=$PLUGINSDIRMyBitmap.bmp "c:\\MyBitmap.bmp"    


>Var /GLOBAL Button
${NSD_CreateButton} 115u 100u 58 35 ""
Pop $Button
${NSD_AddStyle} $Button "${BS_BITMAP}"
System::Call 'user32::LoadImage(i 0, t "$PLUGINSDIR\MyBitmap.bmp", i ${IMAGE_BITMAP}, i 0, i 0, i ${LR_CREATEDIBSECTION}|${LR_LOADFROMFILE}) i.s'
Pop $1
SendMessage $BUTTON${BM_SETIMAGE} ${IMAGE_BITMAP} $1
${NSD_OnClick} $BUTTON BUTTON_Click

>Function Button_Click
Pop$0
ExecShell "open" "http://web.archive.org/web/*/www.winamp.com"
>FunctionEnd
>
OK, we have clickable button with image. Now I need to display hand cursor, when user moves mouse over the button.
How to display that cursor (hand, not default arrow)?

2. I need to dispaly clickable Link control on the nsdialogs created nsis page. The problem is, that this link should be displayed
below the page area, on the left of Buttons. See the attached picture.

I now how to display Link control using nsDialogs, but dont know how to display it in that place.
Here is a code how to display link.

Link 


>${NSD_CreateLink} 115u 90u 58 35 "http://web.archive.org/web/*/www.winamp.com"
>Pop $Link
>${NSD_OnClick} $Link Link_Click

>Function Link_Click
Pop$0
ExecShell "open" "http://web.archive.org/web/*/www.winamp.com"
>FunctionEnd
>
The question is. How to move that link to the location at the bottom of the page?
Thanks for any help,
regards,
-Pawel

To move the link, calling SetParent with the system plugin might work, then again, it might not, I have never tested

There is also http://nsis.sourceforge.net/Linker_plug-in and even a simple wndsubclass plugin if you want full control


Originally posted by Anders
To move the link, calling SetParent with the system plugin might work, then again, it might not, I have never tested
Hmm, I hope it help. But will have to find some example use the system plugin with "SetParent". or someone of you will give me the solution, what would be the best...

There is also http://nsis.sourceforge.net/Linker_plug-in and even a simple wndsubclass plugin if you want full control
As I understand this plugin change any existing text control to link. I need to create that link control on the bottom of the page....
Thanks,
Waiting for more :p

I'm guessing Anders point with Linker was that the area you point out in your image is where usually the BrandingText would be; so you could just turn that into a link; similar to: http://nsis.sourceforge.net/BrandingURL_plug-in

As for the cursor change - perhaps you could get something going with a timer and a function that checks whether the mouse cursor is within the rect of your control of interest..
otherwise, it's waiting for this wishlist item to be added:
https://sourceforge.net/tracker2/ind...49&atid=373088


found any way to change cursor?


Originally posted by vRock67
found any way to change cursor?
You already asked this question in your own thread: http://forums.winamp.com/showthread.php?t=334945

Please don't ask the same question twice.