Hi,
I need to save or delete entries in editable combobox controls. I have seen similar controls in many software. How can I implement them in QM? The following code only implements some functions
Current problem: I can't get the text in the edit box at the same time, save and reload the items
Thanks in advance for any suggestions and help
david
Macro Macro8
I need to save or delete entries in editable combobox controls. I have seen similar controls in many software. How can I implement them in QM? The following code only implements some functions
Current problem: I can't get the text in the edit box at the same time, save and reload the items
Thanks in advance for any suggestions and help
david
Macro Macro8
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog" "4"
;3 ComboBox 0x54230242 0x0 16 8 144 213 ""
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040C02 "*" "" "" ""
str controls = "3"
str cb3
cb3=
;AAA
;BBB
;Save the current value to the list
;Delete the current list item
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 IDOK
,case IDCANCEL
,case CBN_SELENDOK<<16|3
,_i=CB_SelectedItem(lParam)
,CB_GetItemText(lParam _i _s)
,int n=CB_GetCount(lParam)
,if _i=n-1 ;;Dele
,,mes "Line -1"
,,mes _s
,if _i=n-2 ;;Save
,,mes "Line -2"
,,mes _s
ret 1