07-27-2017, 04:06 PM
A long alphabetical list is to be stored and accessed through a read-only combobox. I need to locate the starting letter in the list to avoid tiresome pull-down actions. I wonder whether there exists something simpler than what I use. Any advice is much appreciated.
Function Dialog45
Function Dialog45
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 183 136 "Dialog"
;3 ComboBox 0x54230243 0x0 33 23 96 212 ""
;6 Edit 0x54030080 0x200 95 7 17 12 ""
;4 Static 0x54000000 0x0 6 7 85 12 "Select Combo Start"
;1 Button 0x54030001 0x4 34 43 48 14 "OK"
;2 Button 0x54030000 0x4 88 43 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040500 "*" "" "" ""
str controls = "3 6"
str cb3 e6
cb3=
;apple
;cat
;class
;dog
;key
;lamp
;paper
;road
;star
;table
;tree
;unix
;victory
;water
;xenon
;yard
;zebra
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 [EN_CHANGE<<16|6]
,_s.getwintext(id(6 hDlg))
,CB_SelectString(id(3 hDlg) _s)
,case IDOK
,case IDCANCEL
ret 1