value of IDC_WAIT ?
BlitzMax Forums/BlitzMax Beginners Area/value of IDC_WAIT ?
| ||
In my application (BMax, not MaxGUI) I want to indicate a time to wait with showing the hourglass-cursor (or the rotating blue circle under Vista). This can be done with: Extern "win32" Function SetCursor(hCursor) End Extern then in code: SetCursor(IDC_WAIT). But I found out, that the pre-declared value in BMax for IDC_WAIT: 32514 has no effect either under Vista or WinXP, the cursor simply does not change. Under Vista the Cursor changes correctly with IDC_WAIT =65543, while under XP this value shows a little Form-Symbol (white rectangle with blue caption). Now I wonder why I get such different results, shouldn't this be a constant with the same value for all Win-Versions, or do I miss something ? |
| ||
I think you're passing the wrong parameter to the wrong function. SetCursor takes a cursor handle, not a cursor id. Try SetCursor(LoadCursor(Null,IDC_WAIT)) And leave the value of IDC_WAIT as 32514 because it's correct. |
| ||
Thank you for your reply. This leads to a new question: In "User32.BMX" I found the declarations: Function LoadCursorA( hInstance,lpCursorName:Byte Ptr) Function LoadCursorW( hInstance,lpCursorName:Short Ptr) How can I convert IDC_WAIT =CONST Int to a Byte Ptr or a Short Ptr ? |
| ||
You should be able to just cast an Int to a Byte Ptr.LoadCursorA(Null,Byte Ptr(IDC_WAIT)) |
| ||
OK, I did that, and now Cursors under Vista and XP are shown as they should. Thx ! |