|
|
|
|
#1 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Checking dialog checkboxes
This is a checkbox control on an exe dialog (not InstallOptions)
Is there a WindowsMessage to do this, because I'd rather not have to use the System plugin with BM_SETCHECK (http://www.minigui.com/api_ref/group...__msgs.html#a1) Cheers -Stu |
|
|
|
|
|
#2 |
|
Major Dude
|
Did you forget SendMessage NSIS command? It does exactly the same thing as using SendMessage from System plugin (except it can't get parameters from "wparam" and "lparam", it just set).
|
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Feb 2003
Location: Toronto, Canada
Posts: 227
|
Yeh SendMessage will do it. I'ved used it for working with checkboxes as follows...
PHP Code:
PHP Code:
|
|
|
|
|
|
#4 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Yes, but wheres the BM_SETCHECK define? It's not in WinMessages.nsh (not the one that I have anyhow)
-Stu |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Feb 2003
Location: Toronto, Canada
Posts: 227
|
No it isn't you have to add it. It's in some windows header file if you really want to look it up. Just type in BM_SETCHECK in any source file in visual studio and select "go to definition". That'll give you the value or just copy the following...
!define BM_GETSTATE 0x00F2 !define BM_SETCHECK 0x00F1 |
|
|
|
|
|
#6 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
That's what I've been trying to find (must reinstall VB!)
Thanks -Stu |
|
|
|
|
|
#7 |
|
Senior Member
Join Date: Mar 2004
Posts: 138
|
Thanks rsegal.Now I have another question: how can I send message to change a droplist box state?A sample ini file like this
PHP Code:
|
|
|
|
|
|
#8 |
|
Major Dude
|
PHP Code:
|
|
|
|
|
|
#9 |
|
Senior Member
Join Date: Mar 2004
Posts: 138
|
I test deguix's code,but not work.These is my code
PHP Code:
PHP Code:
|
|
|
|
|
|
#10 |
|
Major Dude
|
I thought it would not work because of that -1 I put for ${CB_FINDSTRINGEXACT}. MSDN says that if wparam is -1 it would search the whole list, but that doesn't happen. Put 0 on its place.
|
|
|
|
|
|
#11 |
|
Senior Member
Join Date: Mar 2004
Posts: 138
|
I replaceed -1 with 0,but still not work.
|
|
|
|
|
|
#12 |
|
Major Dude
|
Hmmm... Aparently there is a problem with SendMessage from NSIS. Everytime I change the number in wparam and/or lparam it should return the correct index of the item (it now returns 0). This is the correct (tested this time):
code: |
|
|
|
|
|
#13 |
|
Senior Member
Join Date: Mar 2004
Posts: 138
|
I got a idear to do it
PHP Code:
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|