CLEARWIN_INFO@

Platform

Win32, x64

Purpose

To access ClearWin+ parameters.

Syntax

INTEGER(7) FUNCTION CLEARWIN_INFO@( PARAM )
CHARACTER(*) PARAM

Description

Parameters are specified as case insensitive character strings. They may be system or user-defined values.

The following parameters are defined:

ACTION_X
Provides the X value of the control that has generated the call-back.

ACTION_Y
Provides the Y value of the control that has generated the call-back.

ACTIVE_EDIT_BOX
Returns the address of the EDIT_INFO array of the currently active %eb (Edit Box) box. Notice that this edit box might not have focus if, for example, the user had just moved to a menu item.

BUTTON_NUMBER
Returns the button pressed.

CALL_BACK_WINDOW
Returns the Windows HANDLE of the main window that has generated the call-back.

COLUMN_NUMBER
The column clicked in a %lv when the reason is COLUMN_CLICK.

CURRENT_CONTROL
Returns the Windows HANDLE of the control that has generated the call-back.

CURSOR_WINDOW
Used with ADD_CURSOR_MONITOR@. Gives the HANDLE of the control which currently has the cursor.

DRAGGED_ICON
Is set to the value of the HANDLE for the dragged icon, indicating that a icon is currently being dragged (see ADD_GRAPHICS_ICON@).

DROPPED_COUNT
Used with the %dr (OnDragDrop Callback) call-back function to return the number of files dropped.

DROPPED_CURRENT
Used with the %dr (OnDragDrop Callback) call-back function to return the number of the current file being processed (in the range from 1 to the value supplied by DROPPED_COUNT).

DROPPED_ICON
Is set to the value of the HANDLE for the recently dropped icon (see ADD_GRAPHICS_ICON@).

EDITABLE_LISTBOX_INDEX
Holds the index of the listbox item selected by the user from an editable list box (see %el (Editable Combo Box)).

EDIT_KEY
Used with %eb (Edit Box) to get the ASCII value of the last key pressed. This information can be obtained in response to a return of 'DATA_ALTERATION' from CLEARWIN_STRING@('CALLBACK_REASON'). In order to activate this feature you must use the %eb[extended]. The call-back is called after the change has been made so you will need to use one of the above editing functions if you want to undo the key press.

EXTENDED_ERROR
Provides the result of a call to the Windows API function CommDlgExtendedError().

FILTER_ITEM_SELECTED
Holds the index of the file filter that was selected by the user when presented with a GET_FILTERED_FILE@ dialog. This can be used, for example, to detect that the user required to save a file with a different filename extension.

FOCUS_WINDOW
This parameter will return the Window HANDLE of the window with focus, or zero if no window of the application has the focus ( see %hw (Handle)).

FOCUSSED_WINDOW
Used with ADD_FOCUS_MONITOR@. Gives the HANDLE of the control which currently has the keyboard focus.

GAINING_FOCUS
Returns 1 when an (%eb (Edit Box)) edit box gains the focus.

GIF_MOUSE_X
Returns the pixel co-ordinate of a mouse click in a %gi (GIF) image relative to the top left corner of the image.

GIF_MOUSE_Y
Returns the pixel co-ordinate of a mouse click in a %gi (GIF) image relative to the top left corner of the image.

GRAPHICS_DC
Set during the call-back when a %dw (Owner Draw Graphics)[user_resize] graphics area is re-sized (or when it is first created). The call-back can use this to re-draw the image.

GRAPHICS_DEPTH
Provides the 'Y axis' value for the graphics window, vital if the window is resized at any point.

GRAPHICS_HDC
This provides the device context of the drawing surface. It will return zero if there is no current drawing surface. Using this HANDLE you can write additional information to a drawing surface using API functions. The handle points to a bitmap so it is also possible to extract information form this area. Do not use this HANDLE with %gr (Graphics Region) if metafile_resize has been specified. If you use YIELD_PROGRAM_CONTROL@, or if you return from a call-back there is a possibility that the drawing surface will be re-sized (replacing its HANDLE) or closed. It is therefore important to obtain the HANDLE again in such circumstances. In general, obtain the HANDLE, perform the actions you require, and discard the HANDLE.

GRAPHICS_MOUSE_FLAGS
Provides the flags associated with a mouse event in a graphics (%gr (Graphics Region)) or owner-draw (%dw (Owner Draw Graphics)) control.

The flags should be considered as a set of bits thus:

 

MK_LBUTTON

1

Left mouse button depressed

 

MK_LBUTTON

2

Right mouse button depressed

 

MK_SHIFT

4

Keyboard shift key depressed

 

MK_CONTROL

8

Keyboard control key depressed

 

MK_MBUTTON

16

Middle mouse button depressed

GRAPHICS_MOUSEWHEEL_ROTATION
Provide the movement on the mouse wheel in a graphics (%gr (Graphics Region)) or owner-draw (%dw (Owner Draw Graphics)) control.

GRAPHICS_MOUSE_X
Provide the X co-ordinate of a mouse event in a graphics (%gr (Graphics Region)) or owner-draw (%dw (Owner Draw Graphics)) control.

GRAPHICS_MOUSE_Y
Provides the Y co-ordinate of a mouse event in a graphics (%gr (Graphics Region)) or owner-draw (%dw (Owner Draw Graphics)) control.

GRAPHICS_RESIZING
This returns the value one if the window has been resized making it necessary to interrogate GRAPHICS_DEPTH and GRAPHICS_WIDTH.

GRAPHICS_WIDTH
Provides the 'X axis' value for the graphics window, vital if the window is resized at any point.

The flags should be considered as a set of bits thus:

INTERMEDIATE_SCROLL
Used with %hx (Horizontal Scroll Bar) and %vx (Vertical Scrollbar) to determine if the callback was called whilst the thumb is moving or after its release. Returns the value 1 if the thumb is moving, otherwise zero.

KEYBOARD_KEY
Key press in a %bv (Branch View) or %lv (List View). This is in response to the reason KEY_DOWN.

LATEST_FORMATTED_WINDOW
This is set to the Windows HANDLE of the most recently created formatted window. This HANDLE should be used with care. In particular, if you make explicit Windows API calls using this HANDLE, these may interfere with the action of winio@.

LATEST_VARIABLE
Holds the address of a variable in a call-back attached to %rd (Edit Integer), %rf (Edit Floating Point) or %rs (Edit String).

LATEST_WINDOW
Same as LATEST_FORMATTED_WINDOW.

LISTBOX_ITEM_SELECTED
Used in a call-back function for a list box. Returns 1 if the item was "selected" by double clicking on an item in the extended list; returns zero if the item was "moved to" by using a single click.

LOSING_FOCUS
Returns 1 when an edit box (%eb (Edit Box)) loses its focus.

MAX_GRAPHS_PER_PLOT
Maximum graphs per %pl (SIMPLEPLOT Graphics Region).

MESSAGE_HWND
This is set to the HWND parameter in a call-back from the %mg (Message Callback) format.

MESSAGE_LPARAM
This is set to the LPARAM parameter in a call-back from the %mg (Message Callback) format.

MESSAGE_MSG
This is set to the message parameter in a call-back from the %mg (Message Callback) format.

MESSAGE_WPARAM
This is set to the WPARAM parameter in a call-back from the %mg (Message Callback) format.

OPENGL_ALIVE
Returns 1 if OpenGL is active and zero otherwise. If OpenGL is not active then calling OpenGL routines in ClearWin+ causes a hard error. This information function can be used to guard against such calls.

OPENGL_DEPTH
Returns the HANDLE of the device context for the current %og (OpenGL Graphics Region) region.

OPENGL_DEVICE_CONTEXT
Returns the pixel depth of a resized OpenGL (%og (OpenGL Graphics Region)) region.

OPENGL_WIDTH
Returns the pixel width of a resized OpenGL (%og (OpenGL Graphics Region)) region.

PIXELS_PER_H_UNIT
Translates from device dependant units used by %aw (Attach MDI Child Window) etc. to absolute pixel values

PIXELS_PER_V_UNIT
Translates from device dependant units used by %aw (Attach MDI Child Window) etc. to absolute pixel values

POPUP_X
X Location of last popup menu to be displayed.

POPUP_Y
Y Location of last popup menu to be displayed.

PRINTER_COLLATE etc.
For printer parameters see Customising the printer dialog box.

ROW_NUMBER
Current item in a %bv (Branch View) or %lv (List View).

SCREEN_DEPTH
Returns the vertical screen resolution. Note that the available area of the largest possible window (the client area) will be normally be a little smaller than this because of the caption, border, etc..

SCREEN_NUM_COLOURS
Number of colour available on screen.

SCREEN_WIDTH
Returns the horizontal screen resolution.

SHEET_NO
Holds the value of the current top-most property sheet (%ps (Property Sheet Container)). Initially it is 1.

SPIN_CONTROL_USED
This is set whilst in a call-back for a variable modified using a spin control.

SYSTEM_FONT_HEIGHT
Returns the height of the standard system font in logical units. This can be used to detect whether the user has set the Control Panel, Display Properties to Small Fonts (=16) or Large Fonts (=20) or Other....

TEXT_ARRAY_CHAR etc.
Parameters used with %tx (Text Array) are detailed in Text array.

TOOLTIP_HWND
Window HANDLE of current tooltip.

TREEVIEW_ITEM_SELECTED
Returns the value one when an item has been selected from a treeview control (%tv (Tree Control)) by means of a double mouse click.

USER_DATA
Returns the address of data associated with the control by either %ud (User data) or SET_USER_DATA@. This is equivalent to calling GET_USER_DATA@ with the control's handle.

USER_WINDOW_DATA
Returns the address of data associated with the window by either %ud (User data) or SET_USER_DATA@ (rather than the control that the callback is for -- USER_DATA above returns that). This is equivalent to calling GET_USER_DATA@ with the window's handle.

Return value

Returns the value of the specified integer parameter.

See also

SET_CLEARWIN_INFO@

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited