MSM-Workstation
Macros

Go back to the alphabetic list of macros
Go back to the first page of this tutorial

%%CurrCtl

The macros %%CurrWin and %%CurrCtl are used to identify the window and component for which action logic is being executed.

The macro %%CurrCtl is replaced by an expression that returns the name of the component in question.

Note: The control that currently has focus is not necessarily the same as the control that is the "current control". Typically the two are the same, but not always. For instance, while an object is being created, it is the "current" object, but it doesn't have focus.

Examples

%%Set(%%CurrWin.%%CurrCtl.Value,"Cherry Tree")
Define the value of the current control, using a macro.

Set ^$W(%%CurrWin,"G",%%CurrCtl,"VALUE")="Cherry Tree"
Define the value of the current control, using the MWAPI directly.

See also

%%CurrWin, %%Focus, %%FocusCtl, %%FocusWin and %%SetFocus.