Old 17th October 2011, 06:31   #1
at_mds
Junior Member
 
Join Date: Oct 2011
Posts: 1
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
at_mds is offline   Reply With Quote
Old 17th October 2011, 09:21   #2
pengyou
Major Dude
 
Join Date: Mar 2003
Posts: 571
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"
pengyou is offline   Reply With Quote
Old 17th October 2011, 09:37   #3
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Ideally you should use nsDialogs which makes this kind of thing much easier.

Stu
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump