Old 2nd December 2008, 18:59   #1
volpolo
Junior Member
 
Join Date: Nov 2008
Location: Italy
Posts: 13
DirRequest

For my installer, i want the user choose the installation path by Browse button; NOT by input.

May i disable input in MUI_PAGE_DIRECTORY and in a page created with INSTALLOPTIONS ?

Thanks for help.

By
volpolo is offline   Reply With Quote
Old 2nd December 2008, 23:41   #2
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
Both - yes. In both cases, get the control, and disable it.

For the standard MUI_PAGE_DIRECTORY, adjust your code like this:

Add a callback function for when the page gets shown
code:

!define MUI_PAGE_CUSTOMFUNCTION_SHOW ShowFunc
!insertmacro MUI_PAGE_DIRECTORY



In the callback function, get the control and disable it
code:

Function ShowFunc
; Get the inner (MUI) dialog
FindWindow $0 "#32770" "" $HWNDPARENT

; Get the directory edit field
GetDlgItem $1 $0 0x3fb

; Disable the field
EnableWindow $1 0
FunctionEnd



If you're wondering where the 0x3fb comes from - download WinSpy++ - it allows you to drag&drop a crosshair onto any control and gets its Control ID (among many other goodies).
Animaether is offline   Reply With Quote
Old 3rd December 2008, 04:21   #3
volpolo
Junior Member
 
Join Date: Nov 2008
Location: Italy
Posts: 13
Ok, it's works verywell for me.

Many thanks
volpolo 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