MOUSEPTR statement

Purpose

Change the mouse pointer (cursor) to a new shape.

Syntax

MOUSEPTR style [TO var&]

Remarks

If the optional TO clause is included, the handle of the previous cursor is assigned to var&. If the operation fails, the value zero is assigned to var&. Normally, the Long integer or DWORD value style should be in the range of 1 through 13 to choose one of the stock cursor shapes as follows:

style&

Definition

0

Hide mouse pointer **

1

Arrow

2

Cross

3

I-Beam

4

Arrow

5

Sizing pointer (all directions)

6

Sizing pointer (NE-SW diagonal)

7

Sizing pointer (vertical)

8

Sizing pointer (NW-SE diagonal)

9

Sizing pointer (horizontal)

10

Up arrow

11

Hourglass ("Busy" or "Wait" pointer)

12

No mouse pointer

13

App Starting (arrow with an hourglass)

** If style& = 0 then the OS may restore the cursor if it is moved.

If style is outside the range 0 through 13, it must contain a valid handle to a cursor, such as the value which was returned by a prior invocation of MOUSEPTR. This allows the programmer to restore a previous cursor style.

The mouse pointer is only changed for dialogs and windows in your application. If the mouse pointer is moved over another application or the desktop, the pointer will change to the default for that application/process. In GUI applications, MOUSEPTR can be useful in %WM_SETCURSOR message handler routines that override the default cursor handling.