This is a Windows documentation problem, and although I ordeed
the book Lance and Dave recommended, it has not yet arrived.
(They shipped the wrong book and took a week to acknowledge
my e-mails - still no book).
I'm trying to use a separate button to cause a Combobox to
show its list. I've tried a lot of things, the latest being.
Is this easy to do and if so what message should button 200
send to cause button 201 to drop its list?
$COMPILE EXE
$INCLUDE "WIN32API.INC"
CALLBACK FUNCTION MainLoop()
SELECT CASE CBMSG
CASE %WM_COMMAND
SELECT CASE LOWRD(CBWPARAM)
CASE %IDOK
SELECT CASE HIWRD(CBWPARAM)
CASE %BN_CLICKED
DestroyWindow CBHNDL:PostQuitMessage 0
END SELECT
CASE 200
DIALOG SEND CBHNDL, %WM_COMMAND, %CB_SHOWDROPDOWN*2^16+201&, -1&
CASE 201
END SELECT
END SELECT
END FUNCTION
FUNCTION PBMAIN() AS LONG
LOCAL hDlg AS LONG
DIM DropDown(1:10) AS STRING
LOCAL i AS LONG:FOR i=1 TO 10
ropDown(i)="Item "+STR$(i):NEXT i
DIALOG NEW 0,"Testing",,,320,240,%WS_CAPTION OR %WS_SYSMENU,0 TO hDlg
CONTROL ADD BUTTON,hDlg,200,"Push for DropDown",120,5+2*16,80,14,%BS_LEFT
CONTROL ADD COMBOBOX,hDlg,201,DropDown(),200,5+2*16+1,40,11*10,%CBS_DROPDOWNLIST+%WS_TABSTOP
COMBOBOX SELECT hDlg,201,2
DIALOG SHOW MODAL hDlg, CALL MainLoop
END FUNCTION
the book Lance and Dave recommended, it has not yet arrived.
(They shipped the wrong book and took a week to acknowledge
my e-mails - still no book).
I'm trying to use a separate button to cause a Combobox to
show its list. I've tried a lot of things, the latest being.
Is this easy to do and if so what message should button 200
send to cause button 201 to drop its list?
$COMPILE EXE
$INCLUDE "WIN32API.INC"
CALLBACK FUNCTION MainLoop()
SELECT CASE CBMSG
CASE %WM_COMMAND
SELECT CASE LOWRD(CBWPARAM)
CASE %IDOK
SELECT CASE HIWRD(CBWPARAM)
CASE %BN_CLICKED
DestroyWindow CBHNDL:PostQuitMessage 0
END SELECT
CASE 200
DIALOG SEND CBHNDL, %WM_COMMAND, %CB_SHOWDROPDOWN*2^16+201&, -1&
CASE 201
END SELECT
END SELECT
END FUNCTION
FUNCTION PBMAIN() AS LONG
LOCAL hDlg AS LONG
DIM DropDown(1:10) AS STRING
LOCAL i AS LONG:FOR i=1 TO 10

DIALOG NEW 0,"Testing",,,320,240,%WS_CAPTION OR %WS_SYSMENU,0 TO hDlg
CONTROL ADD BUTTON,hDlg,200,"Push for DropDown",120,5+2*16,80,14,%BS_LEFT
CONTROL ADD COMBOBOX,hDlg,201,DropDown(),200,5+2*16+1,40,11*10,%CBS_DROPDOWNLIST+%WS_TABSTOP
COMBOBOX SELECT hDlg,201,2
DIALOG SHOW MODAL hDlg, CALL MainLoop
END FUNCTION
Comment