Carlo Hogeveen
unread,Jan 12, 2026, 7:57:26 AMJan 12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sem...@googlegroups.com
The below demo macro shows alternate cursor shapes while running in Windows GUI TSE.
More specifically, the text cursor disappears and the mouse cursor takes alternate shapes.
My actual need was and is to show a spinner during longer macro operations, and I can now do so.
I would like to suggest that this might also be nice to have as a native Windows GUI TSE feature.
Carlo
/*
The alternate cursor shapes automatically disappear when the editor is idle.
Because I only need the spinner shape IDC_WAIT during a running macro,
my suggestion is that it would be "nice to have" for
Set(Cursor, ON)
Set(Cursor, OFF)
to be extended with
Set(Cursor, _CURSOR_WAIT_)
.
*/
#define IDC_ARROW 32512
#define IDC_IBEAM 32513
#define IDC_WAIT 32514
#define IDC_CROSS 32515
#define IDC_UPARROW 32516
#define NULL 0
dll "<user32.dll>"
integer proc LoadCursor(
integer hInstance,
integer lpSubKey // Was: [in] LPCSTR
):'LoadCursorA'
integer proc SetCursor(
integer hCursor
)
end
proc Main()
integer module_instance = NULL
integer h_cursor = 0
integer i = 0
integer t0 = 0
for i = IDC_UPARROW downto IDC_ARROW
h_cursor = LoadCursor(module_instance, IDC_ARROW)
SetCursor(h_cursor)
Sound(200 , 200)
Delay(1)
h_cursor = LoadCursor(module_instance, i)
SetCursor(h_cursor)
if i <> IDC_ARROW
t0 = GetTime()
while GetTime() < t0 + 400
Delay(1)
endwhile
endif
endfor
PurgeMacro(CurrMacroFilename())
end Main