Silverfrost Logo About Us | Contact Us
 

CLEARWIN_INFO@

Platform

Win32(ClearWin+)

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 box.

CALL_BACK_WINDOW
This option provides the call-back routine with the handle of the window generating 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 call-back function to return the number of files dropped.

DROPPED_CURRENT
Used with the %dr 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 to get the ASCII value of the last key pressed.

 

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).

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 gains the focus.

GIF_MOUSE_X
Returns the pixel co-ordinate of a mouse click in a %gi 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 image relative to the top left corner of the image.

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

GRAPHICS_DC
Set during the call-back when a %dw[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_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 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_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.

 

GRAPHICS_MOUSE_FLAGS
Provides the flags associated with a mouse event in a graphics (%gr) or owner-draw (%dw) 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_MOUSE_X
Provide the X co-ordinate of a mouse event in a graphics (%gr) or owner-draw (%dw) control.

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

INTERMEDIATE_SCROLL
Used with %hx and %vx 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.

LATEST_FORMATTED_WINDOW
This is set to the Window 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, %rf or %rs.

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) loses its focus.

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

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

MESSAGE_WPARAM
This is set to the WPARAM parameter in a call-back from the %mg 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 region.

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

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

PIXELS_PER_H_UNIT
Translates from device dependant units used by %aw etc. to absolute pixel values

PIXELS_PER_V_UNIT
Translates from device dependant units used by %aw etc. to absolute pixel values

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

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_WIDTH
Returns the horizontal screen resolution.

SHEET_NO
Holds the value of the current top-most property sheet (%ps). 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 are detailed in Text array.

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

Return value

Returns the value of the specified integer parameter.

See also

SET_CLEARWIN_INFO@

 

 

Copyright © 1999-2017 Silverfrost Limited