Information Functions

Top  Previous  Next

General functions to query a window, dialog or control properties.

Retrieving sizes

GETSIZE window | dialog, varL, varT, varW, varH {, ID}

Will return the size of a window, dialog or control in the variables specified. Variables must be of type INT. The left and top coordinates are relative to the upper left corner of the screen. If ID is specified then the size of the control is returned.

See Also: SETSIZE

GETCLIENTSIZE window | dialog, varL, varT, varW, varH

Will return the size of the drawing area of the window in the variables specified. varL and varT will always be 0 with this function. Variables must be of type INT.

GETSCREENSIZE varW,varH

Returns the system screen size. Useful for determining a size to set your window. Variables must be of type INT.

GETTEXTSIZE window, string, varWidth, varHeight

Returns the size of a string in pixels when printed to the window. varWidth and varHeight must be of type INT. The size of the string is useful for setting line positions with the MOVE statement.

Retrieving drawing and caret positions

GETPOSITION window, varX, varY

Retrieves the current drawing position in the window. varX and varY must be of type INT. The current drawing position is set with the MOVE statement, by certain graphics operations, and by the PRINT statement.

GETCARETPOSITION window, varX, varY

Retrieves the current caret position in the window. varX and varY must be of type INT. The window parameter is maintained for backwards compatibility with older versions of EBASIC; It is not used by the function and can be passed an uninitialized WINDOW variable.

Miscellaneous

caption$ = GETCAPTION (window | diaolg)

Returns the windows caption text. Use GETCONTROLTEXT to retrieve the text of button controls.

See also: SETCAPTION, SETCONTROLTEXT

DC = GETHDC(window)

Safe way to access a device context to an Emergence BASIC created window. The returned dc can be used with any Windows API function that requires a device context to the window.

See also: RELEASEHDC