Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unselecting a ComboBox item
#2
Something like this?

Function Dialog90
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
str combobox_text

str controls = "4 5 6"
str cb4 cb5 cb6
cb4="1[]2[]3"
cb5="4[]5[]6"
cb6="7[]8[]9"
if(!ShowDialog("Dialog90" &Dialog90 &controls)) ret


;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 223 135 "Stupomer"
;1 Button 0x54030001 0x4 40 112 48 14 "OK"
;2 Button 0x54030000 0x4 104 112 48 14 "Cancel"
;4 ComboBox 0x54230243 0x0 26 40 44 213 ""
;5 ComboBox 0x54230243 0x0 74 40 44 213 ""
;6 ComboBox 0x54230243 0x0 122 40 44 213 ""
;3 Button 0x54020007 0x0 20 6 154 98 "Example Numbers"
;END DIALOG
;DIALOG EDITOR: "" 0x2030001 "" "" ""

ret
;messages
if(message=WM_INITDIALOG) DT_Init(hDlg lParam)
;int param=DT_GetParam(hDlg)

sel message
,case WM_INITDIALOG
,ret 1
,case WM_DESTROY DT_DeleteData(hDlg)
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case CBN_SELENDOK<<16|4
,,CB_SelectedItem(id(4 hDlg) combobox_text)
,,sel CB_SelectedItem(lParam)
,,,case 0;; 1
,,,,out combobox_text
,,,case 1;; 2
,,,,out combobox_text
,,,case 2;; 3
,,,,out combobox_text
,case CBN_SELENDOK<<16|5
,,CB_SelectedItem(id(5 hDlg) combobox_text)
,,sel CB_SelectedItem(lParam)
,,,case 0;; 4
,,,,out combobox_text
,,,case 1;; 5
,,,,out combobox_text
,,,case 2;; 6
,,,,out combobox_text
,case CBN_SELENDOK<<16|6
,,CB_SelectedItem(id(6 hDlg) combobox_text)
,,sel CB_SelectedItem(lParam)
,,,case 0;; 7
,,,,out combobox_text
,,,case 1;; 8
,,,,out combobox_text
,,,case 2;; 9
,,,,out combobox_text
,case IDOK DT_Ok hDlg
,case IDCANCEL DT_Cancel hDlg
ret 1
Taking on Quick Macros one day at a time


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)