08-19-2015, 09:28 AM
In a menu, among other choices, I want to select an item from a combo box. I wrote the code attached. I wonder whether there exists any other more elegant technique. Any advice will be much appreciated. Thanks in advance.
Menu Menu34_Combo
Function Dialog34_Combo
Menu Menu34_Combo
Function Dialog34_Combo
\Dialog_Editor
str dd=
;BEGIN DIALOG
;0 "" 0x90000AC8 0x0 0 0 58 14 "Dialog"
;3 ComboBox 0x54230243 0x0 6 1 49 212 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2040202 "*" "" "" ""
str controls = "3"
str cb3
cb3=
;1991
;1992
;1993
;1994
;1995
if(!ShowDialog(dd &sub.DlgProc &controls)) ret
#sub DlgProc
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,
,case [CBN_SELCHANGE<<16|3]
,,CB_SelectedItem(id(3 hDlg) _s)
,,_s.setclip
,,DT_Ok hDlg
,case IDOK
,case IDCANCEL
ret 1