05-20-2010, 12:53 PM
Function Dialog342
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
;BEGIN DIALOG
;0 "" 0x90CA0AC8 0x0 0 0 145 107 "Dialog"
;3 ComboBox 0x54230243 0x0 28 16 94 213 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2030202 "*" "" ""
str controls = "3"
str cb3
cb3= "&Select List"
if(!ShowDialog("Dialog342" &Dialog342 &controls)) ret
ret
;messages
sel message
,case WM_INITDIALOG
,ARRAY(str) a; int i
,GetFilesInFolder a "$desktop$\" "*.txt"
,for i 0 a.len
,,_s=a[i]
,,_s.getfilename
,,CB_Add id(3 hDlg) _s
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case CBN_DROPDOWN<<16|3
,SendMessage lParam CB_RESETCONTENT 0 0
,;and now add all items again, like you did it under WM_INITDIALOG. You even don't have to do it under WM_INITDIALOG.
,
,case IDOK
,case IDCANCEL
ret 1