Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Get id of custom button (http://forums.winamp.com/showthread.php?t=336121)

at_mds 17th October 2011 06:31

Get id of custom button
 
Hello All,

Can any one help me in understanding how can i fetch the id of button before going to custom page ..i want to hide that custom button before displaying the page, and enable it on click of check box...for doing this i suppose i need control id of custom button..
So i did like that -
i am using install options for custom page..and my custom button field number is '15'.


!macro checkMemory
GetDlgItem $R0 $HWNDPARENT 1214
EnableWindow $R0 0
!macroend

Function CustomP
!insertmacro checkMemory
!insertmacro INSTALLOPTIONS_DISPLAY "custom.ini"

FunctionEnd

thanks

pengyou 17th October 2011 09:21

InstallOptions supplies the HWND of the control in the INI file. This is explained in the InstallOptions documentation and there is even an example script (Examples\InstallOptions\testnotify.nsi) demonstrating the use of the HWND value, e.g.

ReadINIStr $1 "$PLUGINSDIR\test.ini" "Field 8" "HWND"

Afrow UK 17th October 2011 09:37

Ideally you should use nsDialogs which makes this kind of thing much easier.

Stu


All times are GMT. The time now is 17:33.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.