|
|
#1 |
|
Junior Member
Join Date: Jan 2005
Location: France - Paris
Posts: 7
|
have you some idea, thank you...
in the code below, the following calls don't work: 1. EnableWindow $item 0 --> do nothing 2. SendMessage $item {WM_SETTEXT} "..." --> generate the error Page directory preFunctionDirectory Var hwnd Var item Function preFunctionDirectory ; [Get HWND current page of installation] FindWindow $hwnd "#32770" "" $HWNDPARENT ; [Disable Directory field] GetDlgItem $item $hwnd 1019 ; IDC_DIR EnableWindow $item 0 SendMessage $item {WM_SETTEXT} "C:\SignallingServer\One" ; [Disable Directory GroupBox] GetDlgItem $item $hwnd 1020 ; IDC_SELDIRTEXT EnableWindow $item 0 ; [Disable Browse... button] GetDlgItem $item $hwnd 1001 ; IDC_BROWSE EnableWindow $item 0 ; [Disable label] GetDlgItem $item $hwnd 1006 ; IDC_INTROTEXT EnableWindow $item 0 FunctionEnd |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Sep 2004
Location: Nottingham
Posts: 263
|
1. Dunno, sorry.
2. SendMessage $item ${WM_SETTEXT} 0 "STR:whatever" |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jan 2005
Location: France - Paris
Posts: 7
|
2.
the error is:
SendMessage:warning: unknown variable/constant "{WM_SETTEXT}" detected |
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Sep 2004
Location: Nottingham
Posts: 263
|
Ooooh. You need to !include "WinMessages.nsh" at the top of your script.
|
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Jan 2005
Location: France - Paris
Posts: 7
|
ok RobGrant thank you.
no error now! but, as EnableWindow (first question - 1), SendMessage makes no change on controls. |
|
|
|
|
|
#6 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
That's because the inner window does not yet exist when the pre function is executed. Use the same code in the show function.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Jan 2005
Location: France - Paris
Posts: 7
|
it's OK.
Thank you. |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|