Macro Language Reference > Macros > Window > wdbmi
  
wdbmi
Description
Allows modeless dialogs and advanced dialog scripting methods to interact flexibly with the PTC ALD system.
Syntax
wdbmi "option":s ( ( x:n y:n? ) | ( x:n class:t? ) | ( x:n param:t+ value:t? ) )?
option
The task to be performed (must be enclosed in double quotes)
"f"
Switch input focus to dialog with ID x (x being the ID previously assigned to a dialog). Will not switch focus to a disabled dialog (provided it was disabled via wdbmi "d").
"fd"
Switch input focus to the current document. Will not switch focus if the current document is disabled (provided it was disabled via wdbmi "dd").
"u"
Force update commands for dialog with ID x to run.
"ul"
Same as u above, plus force a rebuild of all dialog lists.
"c"
Close dialog with ID x and emulate an exit/apply code of y.
"h"
Hide dialog with ID x.
"s"
Show dialog with ID x, which was previously hidden.
"d"
Disable dialog with ID x, leave the dialog still visible but show it as greyed out and inactive.
"e"
Enable dialog with ID x, which was previously disabled.
"dd"
Disable main PTC ALD window.
"ed"
Enable main PTC ALD window.
"g"
Return property y of dialog with ID x. Return value is stored in user-space variable wdbmi
"flush"
Flush (remove ) stored dialog positions and sizes from the Windows registry. If a class name is specified, then only the specified dialog class is flushed.
"getparms"
Get the specified parameter of the dialog with ID x. Return value is stored in user-space variable wdbmi.
"setparms"
Set the value of the specified parameter of the dialog with ID x.
 
The parameter instances is meaningless in this context.
x
The ID of the specified dialog
y
The return value of the specified option:
0
Return the current active dialog ID (x is ignored). A return value of 0 indicates the document window is active.
1
Return the total number of dialogs (including those which are invisible or disabled; x is ignored). Return value of 0 indicates no dialogs.
2
Return the title of dialog ID x (if x=0, return the title of the current active dialog). The return value is blank if the specified dialog does not exist or has no title.
3
Get the next dialog ID. If x=0, the topmost (in terms of z-order) dialog ID is returned. For each subsequent call where x<>0 the next dialog ID is returned, until the bottom (ID 0) is reached. When another call is made past ID 0, the dialog pointer resets to the topmost dialog. This is a good way to process every dialog in the system.
class
Class of dialog, called for with the inclusion of flush.
param
class
"string": set the dialogs class to the specified string. Class names are used to uniquely identify the type of dialog.
pos
expr,expr "string": set the dialog’s position to the specified offset (x,y), relative to the upper left corner of the main window frame. If a string value is specified, then a combination of the following characters can be used: t =top, b=bottom, l =left, r=right.
abpos
expr,expr: set the dialog’s position to the specified offset (x,y), relative to the upper left corner of the screen.
size
expr,expr: resize the dialog to the specified width and height. This option is only applicable to resizable dialogs (see resize).
resize
expr: flag the dialog as resizable.
store
expr: flag whether the dialog’s size and position should be stored in the Windows registry. This setting will override any user preference.
param (cont...)
bgcol
expr: set the background color for the dialog box to the specified color value. This setting uses the same color values as dialog groups.
parentwh
expr: allows only the specified number of instances of this dialog class to be created. The current dialog will not open if it would exceed this limit. A value of -1 indicates unlimited instances, any other positive 32-bit signed integer value is valid.
maxsize
expr, expr: set the maximum dimensions (width, height) of the dialog. A value of -1 indicates infinite size, a value of 0 indicates the minimum size for that axis of growth (e.g. no growth along that axis). Any other value is interpreted literally as a number of pixels. this option is only applicable to resizable dialogs (see resize).
controls
exp: sets which dialog controls are available. All dialogs now contain the close control button; you may specify 3 to this parameter, which will give you an additional rollup control button. The rollup button will shrink the dialog to the height of the title bar when clicked. It may then be rolled down again. roltoggle will switch between the two, depending on the current setting. The controls are rendered in system colors 202 and 203.
shrunk
read only: this parameter can only be read using an awdbmi "getparms" macro call. The call returns 1 if the dialog is shrunken and embedded in a toolbar, 0 otherwise.
param (cont...)
title
"string": this parameter can be used to set or read the title of the given dialog. The parameters returns the currently displayed title (a truncated version if the full title is too long). When setting the title, note that alignment characters (| and ||) are not available and the current alignment is kept from the originally specified title.
value
The value to be applied to the string/expression/parameter defined under property
Additional Information
 
Below are some important points to note about dialog parameters:
The resize and instances parameters cannot be set through calls to wdbmi.
If a class name is not defined for a dialog by an embedded [[parms]], the class name is set to the raw title string, less any leading fill characters.
Untitled dialogs inherit the default title name of "_dbt_X_", where X is their dialog ID number. Consequently, their class name reflects this; the class name of an untitled dialog can never be guaranteed to be even pseudo-unique to the dialog type.
The string "_dbt_" as the first five characters of a class name is reserved.
Class names are case sensitive.
For more information, see Technote 0051: Modeless Dialogues and Technote 0070: Resizable Dialogues.