Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Change icon from mouse pointer
#1
Information 
Is there a way to set the icon from mouse pointer to a loading icon while a process is taking effect? I pretend to change it to the blue circle loading icon.

Regards.
#2
SetCursor changes cursor inside windows of your macro. Example:

Function Dialog250
Code:
Copy      Help
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
Code:
Copy      Help
OnScreenDisplay "Please wait" -1 0 0 0 0 0 8 "OSD_5f984c901"
mes "a process is taking effect"
OsdHide "OSD_5f984c901"


Forum Jump:


Users browsing this thread: 1 Guest(s)