05-10-2023, 01:20 PM
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog" "4"
;3 Button 0x54032000 0x0 16 20 48 14 "Button"
;4 Button 0x54012003 0x0 80 24 48 10 "Check"
;5 Edit 0x54030080 0x200 16 4 96 13 ""
;6 Static 0x54000000 0x0 124 4 48 13 "Text"
;7 Button 0x54032009 0x0 140 24 58 10 "Option first"
;8 ListBox 0x54230101 0x200 16 52 96 48 ""
;9 SysListView32 0x5403C04D 0x0 120 52 96 48 ""
;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 = "4 5 7 8"
str c4Che e5 o7Opt lb8
lb8=
;aaaa
;bbbb
;cccc
str lv9=
;aaaa
;bbbb
;cccc
int cursor
if(!ShowDialog(dd &sub.DlgProc &controls)) ret
#sub DlgProc v
function# hDlg message wParam lParam
int hsys32=id(9 hDlg)
sel message
,case WM_INITDIALOG
,int es=LVS_EX_FULLROWSELECT|LVS_EX_INFOTIP|LVS_EX_GRIDLINES
,SendMessage hsys32 LVM_SETEXTENDEDLISTVIEWSTYLE es es
,TO_LvAddCol hsys32 0 "" -100
,int n=numlines(lv9)
,for _i 0 n
,,_s.getl(lv9 _i)
,,TO_LvAdd hsys32 _i 0 0 _s
,case WM_SETCURSOR
,str cls.getwinclass(wParam)
,sel cls
,,case ["Button","ListBox" , "SysListView32"]
,,cursor=LoadCursor(0 +IDC_HAND)
,,SetCursor cursor
,,ret DT_Ret(hDlg 1)
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1