04-27-2022, 11:07 AM
SetCursor changes cursor inside windows of your macro. Example:
Function Dialog250
If your macro is windowless, instead you can show an info window or OSD. Example:
Macro Macro3201
Function Dialog250
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog" "4"
;3 Button 0x54032000 0x0 8 8 56 14 "Cursor wait"
;4 Button 0x54032000 0x0 8 28 56 14 "Cursor normal"
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040C02 "*" "" "" ""
int cursor
if(!ShowDialog(dd &sub.DlgProc 0)) ret
#sub DlgProc v
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
,case WM_SETCURSOR
,if(cursor) ret DT_Ret(hDlg 1)
ret
;messages2
sel wParam
,case 3
,cursor=LoadCursor(0 +IDC_WAIT)
,SetCursor cursor
,case 4
,cursor=0
,SetCursor LoadCursor(0 +IDC_ARROW)
ret 1
If your macro is windowless, instead you can show an info window or OSD. Example:
Macro Macro3201