A cursor is a small bitmap usually used for denoting where the mouse pointer is, with a picture that might indicate the interpretation of a mouse click. As with icons, cursors in X and Windows 3 are created in a different manner. Therefore, separate cursors will be created for the different environments. Platform-specific methods for creating a wxCursor object are catered for, and this is an occasion where conditional compilation will probably be required (see wxIcon for an example).
A single cursor object may be used in many windows (any subwindow type). The wxWindows convention is to set the cursor for a window, as in X, rather than to set it globally as in Windows 3, although a global wxSetCursor is also available for Windows 3 use.
Run the hello demo program to see what stock cursors are available.
wxCursor::wxCursor
voidwxCursorshort bits[], intwidth, int height
voidwxCursorchar * cursor_name
voidwxCursorint id
Constructor. A cursor can be created by passing an array of bits (XView and Motif only) by passing a string name, or by passing a stock cursor id. cursor_name refers to a filename in X, or a resource name in Windows 3.
The following stock cursor ids may be used:
wxCursor::wxCursor
voidwxCursor
Destroys the cursor. Unlike an icon, a cursor can be reused for more than one window, and does not get destroyed when the window is destroyed. wxWindows destroys all cursors on application exit.