Try the following MapBasic code ======================================
define IDC_APPSTARTING 32650 ' The application starting cursor (arrow and hourglass). define IDC_ARROW 32512 ' The regular arrow pointer cursor. define IDC_CROSS 32515 ' The cross cursor. define IDC_IBEAM 32513 ' The I-shaped beam cursor (text editing cursor). define IDC_ICON 32641 ' Win NT only: An empty cursor. define IDC_NO 32648 'The "no" symbol cursor (circle with a slash). define IDC_SIZE 32640 ' Win NT only: The four-pointed resize/move arrow. define IDC_SIZEALL 32646 ' The four-pointed resize/move arrow. define IDC_SIZENESW 32643 'The double-pointed resize arrow pointing to the upper-right and lower-left. define IDC_SIZENS 32645 'The double-pointed resize arrow pointing up and down. define IDC_SIZENWSE 32642 ' The double-pointed resize arrow pointing to the upper-left and lower-right. define IDC_SIZEWE 32644 ' The double-pointed resize arrow pointing left and right. define IDC_UPARROW 32516 ' The up-arrow cursor. define IDC_WAIT 32514 ' The wait cursor (hourglass). Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Integer) Declare Function LoadCursor Lib "user32.dll" Alias "LoadCursorA" (ByVal hInstance As Integer, ByVal lpCursorName As Integer) As Integer Declare Function SetCursor Lib "user32.dll" (ByVal hCursor As Integer) As Integer Dim hcursor As Integer ' receives handle to application starting cursor Dim ncursor As Integer ' receives handle to cursor Dim retval As Integer ' throw-away return value ncursor = LoadCursor(0, IDC_APPSTARTING) ' load Windows's application starting cursor hcursor = SetCursor(ncursor) ' set it to the new cursor call Sleep (3000) ' wait for 3 seconds ncursor = LoadCursor(0, IDC_SIZEALL) ' load Windows's application starting cursor retval = SetCursor(ncursor) ' set it to the new cursor call Sleep (3000) ' wait for 3 seconds ncursor = LoadCursor(0, IDC_NO) ' load Windows's application starting cursor retval = SetCursor(ncursor) ' set it to the new cursor call Sleep (3000) ' wait for 3 seconds retval = SetCursor(hcursor) ' set it to the previous cursor =========================== It will show 3 different cursors for 3 seconds each regards Bo Thomsen GeoConsult I/S -----Oprindelig meddelelse----- Fra: Christophe Brabant [mailto:[EMAIL PROTECTED] Sendt: 26. november 2004 13:38 Til: MapInfo Help Emne: MI-L using Visual C++ Macros from MapBasic Any idea for that ? ============= Hi everyone I would like to use Win32 API like LoadCursor and SetCursor. The second argument of LoadCursor is returned by the Macro called MAKEINTRESOURCE For example, IDC_WAIT = MAKEINTRESOURCE(32524) The macro definition in Winuser.h is : (for Ascii) #define MAKEINTRESOURCEA(i) (LPSTR) ((ULONG_PTR)((DWORD)(i))) Hor could I include that into the MapBasic program ? Thank you --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 14247
