Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   DirRequest (http://forums.winamp.com/showthread.php?t=300552)

volpolo 2nd December 2008 18:59

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

Animaether 2nd December 2008 23:41

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).

volpolo 3rd December 2008 04:21

Ok, it's works verywell for me.

Many thanks


All times are GMT. The time now is 05:32.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.