Archive: NSD_CreateLink on bitmap


NSD_CreateLink on bitmap
First of all, thanks for nsDialogs! I really like it.

I'm currently trying to create an image link using nsDialogs with NSIS 2.32 and came up with the following solution.

${NSD_CreateBitmap} 43% 40% 45u 45u "" 
Pop $IMAGECTL

StrCpy $0 $INSTDIR\test.bmp
System::Call 'user32::LoadImage(i 0, t r0, i ${IMAGE_BITMAP}, i 0, i 0, i ${LR_LOADFROMFILE}) i.s'
Pop $IMAGE

SendMessage $IMAGECTL ${STM_SETIMAGE} ${IMAGE_BITMAP} $IMAGE

${NSD_CreateLink} 43% 40% 45u 45u http://domain.com
Pop $LINK

${NSD_OnClick} $LINK onClickMyLink

nsDialogs::Show

System::Call gdi32::DeleteObject(i$IMAGE)


Is this the recommended way of doing it or is there a better solution that probably not involves creating the link above the image?

Thanks!

Florian

Add the SS_NOTIFY style when creating the image control and use the attached version of nsDialogs which translates STN_NOTIFY to OnClick. You can then call nsDialogs::OnClick on the static control.

The attached version will be part of 2.33.


Works like a charm :)

Thanks!

Florian