The problem is because of the wait command in your dialog procedure
The dialog doesn't process messages while waiting.
You could use opt waitmsg 1 but better to move whole code to a sub function and run in a separate thread like so.
The dialog doesn't process messages while waiting.
You could use opt waitmsg 1 but better to move whole code to a sub function and run in a separate thread like so.
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 296 148 "Dialog" "4"
;3 ListBox 0x54230101 0x200 0 0 296 114 ""
;4 Button 0x54032000 0x0 5 119 48 14 "START"
;END DIALOG
;DIALOG EDITOR: "" 0x2040A00 "*" "" "" ""
str controls = "3"
str lb3=
;a
;b
;c
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 4
,int hlb=id(3 hDlg)
,mac "sub.remove_item" "" hlb
,case IDOK
,case IDCANCEL
ret 1
#sub remove_item
function cid
int amount i
amount=LB_GetCount(cid)
for(i amount-1 -1 -1)
,SendMessage(cid LB_DELETESTRING i 0)
,out i
,0.4