Formatting of dialog controls

Top  Previous  Next

In windows shown by function ArcShowDialogProcW, parameter ControlsDesc specifies dialog controls in the following format (empty string – additional controls are missing).


Here XX – one of codes meaning:






CheckBox. <Value> format:

N<flag text>

N – is 0 or 1. Value 1 means the flag is set.



RadioButton. Format of <Value> is the same as for CheckBox.



Label. Here <Value> – message text string. Text may contain formatted constructions [f…;…] .



Space. <Value> – is a whole number, space between elements.



ComboBox. <Value> :

TN|<header>|<text by default>|<text1>|<text2>|…|<textX>

Here T – is one of characters:

"e" – editable ComboBox,

"a" – editable ComboBox with AutoComplete,

"x" – non-editable ComboBox.

N – is a number, index of default selected text. If "-" (minus) – nothing is selected by default, if empty string – the selected element is defined by prompt.

<header>text printed near ComboBox.

<prompt> – starting text in ComboBox (may be empty if N).

<textX> – an item in ComboBox.


If '|' (pipe) is a part of the text, it must be escaped (prepended) with the escape character '\' (back slash).



TextBox. <Value> :

T|<Header>|<Default text>

Here T – is one of:

"E" – regular TextBox,

"f" – file selector TextBox,

"F" – folder selector TextBox,

"A" – file or folder selector TextBox.

If '|' (pipe) is a part of the text, it must be escaped (prepended) with the escape character '\' (back slash).



CommandLink. <Value> – string with a text for CommandLink. First line of the text is highlighted in bold. Text may be formatted with formatters [f…;…] .

The leading character in the text may be '~' – then such element will be disabled, character '+' – enabled, character '!' – enabled and selected by default.

Text lines are delimited with new line character CR '\r' (code 13) or CR and LF '\r\n' (codes 13 and 10).

By default if elements CommandLink are not specified, the window will contain button “OK”, otherwise – only button “Cancel”.

When one of CommandLink is clicked, function returns the order number CommandLink starting with 0.



Button. Is shown at the bottom of the window. Here <Value> – is a button label.

If a number is specified from 1 and more, a standard text will be used for buttons. See text codes in language lng-files in subfolder Languages (1 corresponds to button “OK”, 2 – “Cancel” etc.).


If multiple buttons are specified, a number -1 will be returned for the very first button from left, -2 – for the second, etc.