My program consists of a modeless dialog box created with DialogBoxParam for its main window.
I want to change its cursor to an hourglass (when a certain event occurs), I go like this
.
.
.
INVOKE LoadCursor,hInstance,IDC_WAIT
INVOKE SetCursor,eax
.
.
.
the LoadCursor returns 0=error code, to any of you that might suggest changing hInstance to
the dialog box handle: tried that, same result.
what am I doing wrong? I think I'm supposed to send some message to the dialog box.. been
looking through API reference, couldn't find it..
thanks in advance
your not gonna be happy when i tell you this, but it doesn't matter if its a dialog box or a window, but when you call LoadCursor, and try to load one of windows predefined cursors, you have to set the hInstance to NULL, (it actualy does say that), otherwise windows searches your exe file looking for a cursor with the same value as IDC_WAIT
Hi.
Try this...
invoke LoadCursor,0,IDC_WAIT
invoke SetCursor,eax
The Win32 Programmer's Reference doesn't mention this, but I ran across it somewhere and it worked for me.
Good luck.