%cu - Cursor

Purpose

Establishes a cursor for the next control in a format.

Syntax

winio@('%cu[cursor_name]')
winio@('%`cu', const)
integer(7) const     (input)
winio@('%Ncu[name1][name2] . . . [nameN]',sel)
winio@('%`Ncu', const1const2, . . ., constNsel)
integer selconst1const2, . . ., constN     (input)

Modifiers

Grave accent (`) - cursor is specified by using a ClearWin+ parameter from windows.ins.

Description

cursor_name is a standard character string (can be replaced by @) that is used to identify a cursor via a resource script.

The alternative uses a grave accent modifier together with const which is one of:

 

 

CURSOR_ARROW

Standard arrow cursor

 

CURSOR_IBEAM

Text I-beam cursor

 

CURSOR_WAIT

Hourglass cursor

 

CURSOR_CROSS

Cross hair cursor

 

CURSOR_UPARROW

Vertical arrow cursor

 

CURSOR_SIZE

A square with a smaller square inside its lower-right corner

 

CURSOR_ICON

Empty icon

 

CURSOR_SIZENWSE

Double-pointed cursor with arrows pointing Northwest and Southeast

 

CURSOR_SIZENESW

Double-pointed cursor with arrows pointing Northeast and Southwest

 

CURSOR_SIZEWE

Double-pointed cursor with arrows pointing west and east

 

CURSOR_SIZENS

Double-pointed cursor with arrows pointing North and South


 

If const is not one of these values then it is assumed to be a valid Windows API handle of an existing cursor (cf. %bm (Bitmap) and %ic (Icon)).

Another pair of alternatives uses a positive integer N to provide a selection of N different cursors. In this case the variable sel is given a value in the range 1 .. N in order to specify a particular cursor. sel can also be set to zero in which case the cursor is hidden from view. A zero value is particularly useful when calling SET_GRAPHICS_SELECTION@.

The examples below illustrate the first pair of alternatives.

cursor_name can also take the form of an integer handle surrounded by curly brackets or the name of an external file surrounded by curly brackets.

Example

winio@('%cu[mycursor]')
mycursor CURSOR file.cur      (resource file)

winio@('%`cu',CURSOR_IBEAM)
					

See also

%dc (Default Cursor), set_cursor_waiting@


 

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited