See Also: alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls
ids is a sequence of ids to change
disttype is one of, or a list of ...
pValue, if used with the ...Most options, is the minimum position. When used with the other options it is the exact position to use. It can be a pixel value or an id value in a sequence.
Example
-- Align them all to fld3's left edge.
alignControls({fld1,fld3,fld4,fld7}, w32LeftEdge, {fld3})
-- Move these up to whatever among them is the topmost fld.
alignControls({fld2,fld0,fld9,fld5}, w32TopMost, 0 )
-- Center fld9 with respect to the screen
alignControls(fld9, {w32VertCentre,w32HorzCentre}, {Screen} )
See Also: addToBand, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls
If flag is w32True, the control id is set to have CanFocus, otherwise it is set off. The default for controls is on.
If id is a single control id, then the return value is a integer.
If id is a sequence of controls, then the return value is a sequence
containing one status flag per control referenced in id.
id can be either a single control id or a list of ids in a sequence.
CanFocus means that when the control gets focus, and if it's CanFocus property is off, then the focus is not set.
Example:
sequence asv
asv = canFocus({fldName, fldAddress}, w32False)
See Also: addToBand, alignControls, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls
Example:
centerControl(CustDialog, Screen)
centerControl(BtnX, CustDialog)
See Also: addToBand, alignControls, canFocus, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls
This is used to wipe a Window or Pixmap Example:
clearWindow( MyWindow )
clearWindow( MyPixmap )
See Also: addToBand, alignControls, canFocus, centerControl, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls
pControl specifies either a single control id or a list of control ids
pPropId specifies a unique 'name' for the property.
pData is the data used to initialize the property. This value is also used
by resetUserProperty.
This is used to create a property or attribute of a control that is not standard. You can use this property however you like. The most common usage is to store information for specific controls that are not normally tracked.
Example:
-- Create a property called 'OrigValue' for three controls.
defineUserProperty({fldName, fldAddr, fldPhone},
"OrigValue", "")
See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls
pControl specifies the id of the control. This can be either a
single id, or a list of ids in a sequence.
pPropId specifies a
property defined by an early call to defineUserProperty.
Examples:
deleteUserProperty(fldX, "Animation")
deleteUserProperty( {fldA, fldB, fldC}, "TimeOut")
See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls
When a control is destroyed, it releases its resources back to Windows. This also means that a parent control also destroys its child controls.
When the control being destroyed is a Window, it cannot be reopened. If you want to be able to reopen a window, use closeWindow() instead of destroy().
When this is called, but before the control is actually destroyed, the w32HDestroy event is triggered, enabling you to clean up things associated with this control. Or even prevent the control from being destroyed, by returning -1 from the event handler.
The following will destroy a pushbutton called MyButton.
-- destroy a pushbutton
destroy( MyButton )
See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls
ids is the set of controls to distribute. There must be at least two ids
in the sequence.
disttype is the type of distribution required. It can be one of...
Examples
-- Move these fields such that the horizontal gap between
-- each is the same amount. In this case, fld1 and fld3 remain
-- still while fld2 is centered between them.
distributeControls( {fld1, fld2, fld3}, w32HorzGap, 0)
-- Move these fields such that the horizontal gap between
-- each is the same amount. In this case, only fld1 remains
-- still while fld2 and fld3 are moved such that the distance
-- between fld1 and fld3 is 200 pixels.
distributeControls( {fld1, fld2, fld3}, w32HorzGap, 200)
-- Move these fields such that the horizontal gap between
-- each is the same amount. In this case, only fld1 remains
-- still while fld2 and fld3 are moved such that the distance
-- between fld1 and fld3 is the width of fld4.
distributeControls( {fld1, fld2, fld3}, w32HorzGap, {fld4} )
See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls
Each subsequence returned has the control id and the control's type, for
all the controls owned by id.
It returns an empty sequence if the id has no children.
Example
sequence children
-- Get a list of all the controls owned by this window
children = findChildren(myWin)
-- Set the caption for each of the PushButtons.
for i = 1 to length(children) do
if find(children[i][2],{PushButton,DefPushButton}) then
setText(children[i][1], sprintf("Button%d", i))
end if
end for
See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls
This can be used for TreeView items as well by using the syntax for id as { TV, TVItemId }
If the id has no parent, this function returns 0.
If the id is invalid, this function returns -1.
See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls
--------------------------------------------------------
See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls
The first subsequences is a list of all the child controls' ids.
The second subsequence is a list of their corresponding control type codes.
It returns an empty subsequences if the id has no children.
Example
sequence children
-- Get a list of all the controls owned by this window
children = getChildren(myWin)
-- Set the caption for each of the PushButtons.
for i = 1 to length(children) do
if find(children[2][i],{PushButton,DefPushButton}) then
setText(children[1][i], sprintf("Button%d", i))
end if
end for
See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls
This routine handles relative positions similar to the create() routine
Example:
-- where does {0.50, 10} in MyWindow appear on the screen?
sequence point
-- get the screen position
point = getClientPoint( MyWindow, 0.50, 10 )
-- display the size
wPrintf( MyWindow, "The point {0.50,10} maps to {%d, %d on the screen"}, point )
See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls
Unlike the menu, toolbar and statusbar both occupy space in the window. To determine what part of the window's client area is not covered, use this function. This function can be used even if there is no toobar or statusbar in the window.
For example, the generic demo has a MleText that needs to be resized every time the window is resized. It uses getClientRect to determine the metrics of the MleText.
-- color the unoccupied portion of the window red
sequence rect
-- find out what portion of the window is available
rect = getClientRect( TheWindow )
-- draw a filled rectangle
setPenColor( TheWindow, Red )
drawRectangle( TheWindow, w32True, rect[1], rect[2], rect[1]+rect[3], rect[2]+rect[4] )
---------------------------------------------------------------------------
See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls
The returns the pixel positions of the top-left corner, relative to the screen and the width and height of the client area. For Screen, Printer and Pixmap the top-left is always 0,0
Example:
-- where is the button located?
sequence extent
-- get the extent of the button
extent = getClientSize( MyButton )
-- display the position
wPrintf( MyWindow, "MyButton is at %d,%d and width=%d, height=%d", extent )
See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls
id is the id of a control that you want information from.
pFields is a list of fields whose value can be requested.
Example:
sequence lValues
lValues = getControlInfo(myWin,
{CONTROLINFO_handle,
CONTROLINFO_owner,
CONTROLINFO_type
})
See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls
Example:
-- how large is TheButton?
sequence size
-- get the size of TheButton
size = getCtlSize( TheButton )
-- display the size
wPrintf( MyWindow, "TheButton is %d by %d"}, size )
See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls
See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls
See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls
See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls
Example:
-- Where is TheButton?
sequence posn
-- get the position of TheButton
posn = getPosition( TheButton )
-- display the position
wPrintf( MyWindow, "TheButton is at %d, %d}, posn )
See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls
The returns the pixel positions of the top-left corner and the bottom right corner. For Screen, Printer and bitmaps the top-left is always 0,0 and thus right is the width and bottom is the height.
Example:
-- where is the window located?
sequence extent
-- get the extent of the window
extent = getRect( MyWindow )
-- display the position
wPrintf( MyWindow, "MyWindow is located at %d,%d }, extent[1 .. 2] )
See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls
This is used by event handlers to find out which control was active when the event was invoked.
Example
procedure Clicker()
integer lSelf
lSelf = getSelf()
if lSelf = btnOne then
...
else
...
end if
end procedure
See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls
ret Sequence: The contents of the user defined property.
pControl specifies the id of the control. This can be either a
single id, or a list of ids in a sequence.
pPropId specifies a
property defined by an early call to defineUserProperty.
The data isreturned as the first, and only, element in a sequence.
If an empty sequence is returned, it means that the specified
property has not been defined for this control.
If id is a sequence, then the returned sequence contains two
subsequences. The first is alist of the returned property values and
the second is a list of w32True/w32False values; one per control listed
in id. A w32True indicates that the respective control has this property
set and w32False indicates that it has not been set.
Examples:
sequence lValues
lValues = getUserProperty(fldX, "Animation")
if length(lValues) = 0 then
-- No value, so use a default.
lValues = {20}
end if
-- NB: The property value is always in element [1]!
doAnimation( lValues[1] )
This next example shows how to get the property values from a list of controls
sequence lValues
sequence lFlds
lFlds = {fldA, fldB, fldC}
lValues = getUserProperty( lFlds, "TimeOut")
for i = 1 to length(lValues) do
if lValues[2][i] = w32False then
-- Provide a default value then.
lValues[1][i] = 5
end if
-- Process the property value which is in lValues[1][i]
doSomethingClever( lFlds[i], lValues[1][i])
end for
See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls
id is the id of a window that you want information from.
pFields is a list of fields whose value can be requested.
Example:
sequence lValues
lValues = getWindowInfo(myWin,
{WINDOWINFO_WLeft,
WINDOWINFO_WTop,
WINDOWINFO_WindowStatus
})
printf(o, "Window is at %d, %d and is %s",
{lValues[1], lValues[2],
w32iff(lValues[3], "active", "inactive")})
See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls
Retrieves the dimensions of the bounding rectangle of the specified window. The dimensions are given in screen coordinates that are relative to the upper-left corner of the screen.
See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls
Note: A TabItem is always enabled. Example:
-- is TheButton enabled?
integer flag
flag = isEnabled( TheButton )
See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls
Example:
-- Restore a maximized window?
if isMaximized( myWindow ) then
showWindow( myWindow, SW_RESTORE)
end if
See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMinimized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls
Example:
-- Restore a minimized window?
if isMinimized( myWindow ) then
showWindow( myWindow, SW_RESTORE)
end if
See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isScreenPointIn, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls
This is used for hit testing, to determine if a point lies on a control.
Example:
-- check if screen point {10,10} lies in MyWindow
if isScreenPointIn( MyWindow, 10, 10 ) then
-- point is in MyWindow
end if
See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isTopLevelWindow, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls
Example:
if isTopLevelWindow(xx) then
moveWindow( . . . )
end if
See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isVisible, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls
Note: A TabItem is always visible. Example:
-- is TheButton visible?
integer flag
flag = isVisible( TheButton )
See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isEnabled, isMaximized, isMinimized, isScreenPointIn, isTopLevelWindow, makeFront, moveZOrder, openDialog, openWindow, popup, refreshWindow, registerHotKey, resetUserProperty, setClientRect, setCtlPosition, setCtlSize, setEnable, setErasePolicy, setFocus, setHint, setHintEx, setHintWidth, setReadOnly, setReBarAutoSizing, setRect, setSubFields, setTabStops, setUserProperty, setVisible, setWindowBackColor, setWindowRect, showWindow, sizeControls
id can either be a control's id value or take the form {hWnd}.
Example:
atom hwnd_MsgWindow
hwnd_MsgWindow = getHandle(MsgWindow)
. . .
-- Using a control id
makeFront( GroupX )
-- Using a hWnd
makeFront( {hwnd_MsgWindow} )
See Also: addToBand, alignControls, canFocus, centerControl, clearWindow, defineUserProperty, deleteUserProperty, destroy, distributeControls, findChildren, findParent, findParentWindow, getChildren, getClientPoint, getClientRect, getClientSize, getControlInfo, getCtlSize, getFocus, getHint, getParent, getPosition, getRect, getSelf, getUserProperty, getWindowInfo, getWindowRect, isE