DCX - Dialog Control Xtension

The box control is a container control like the panel. It hosts other controls inside and also has the Cell Layout Algorithm available to manage the layout of child controls automatically.

Control Styles
These control styles are available when creating a Box control. Remember that the general styles disabled, group, hidden, notheme, tabstop and transparent apply to all DCX controls except the embedded Dialog and Window controls.
alpha Control is alpha blended.
bottom Control text is at the bottom of the box.
center Control text is centered.
check The box frame will have a checkbox which can enable/disable all children controls (regardless of previous state).
hgradient Draws a horizontal gradient with the colors specified.
noformat Disables support for mIRC codes in control (faster).
none Control will not display a border or label.
right Control text is right justified.
rounded The border drawn for the box control will be a rounded rectangle.
shadow Display text with a shadow.
vgradient Draws a vertical gradient with the colors specified.
  • Applying the border regular+dialog frame border styles on the box will give it a titlebar. (/xdid -x DNAME BOX_ID +bd)
  • shadow will only work if the text color is not black or the same as the default text color on the current windows theme (ie. $rgb(0, 0, 0) or $dcx(GetSystemColor, COLOR_WINDOWTEXT) respectively). Change it by using xdid -C

/xdid flags
Control commands are input to the control with the /xdid command.
/xdid -c
This command lets you add a child control to a box control.
/xdid -c [DNAME] [ID] [CID] [CONTROL] [X] [Y] [W] [H] (OPTIONS)
/xdid -c dcx 4 12 richedit 10 10 400 25 multi
CID Unique control ID for the DCX Control. Must be unique for all the controls of the dialog!
CONTROL The type of DCX Control to create. Values can be:
button, calendar, colorcombo, comboex, datetime, directshow, ipaddress, listview, pbar, richedit, statusbar, toolbar, trackbar, treeview, updown, webctrl
box, check, edit, image, line, link, list, radio, scroll, text
divider, pager, panel, rebar, stacker, tab
dialog or window.
X X position of control.
Y Y position of control.
W Width of control.
H Height of control.
OPTIONS Optional styles and options available on each individual controls.
Note. If docking a mIRC @Window or mIRC Dialog, the first parameter in OPTIONS must be the @window/dialog name.

/xdid -d
This command lets you delete a control added on the box.
/xdid -d [DNAME] [ID] [CID]
/xdid -d dcx 4 6

/xdid -l
This command lets you add Cell Layout Algorithm rules to your dialog controls for automatic resizing of the child controls.
/xdid -l [DNAME] [ID] [COMMAND] [PATH] [TAB] [+FLAGS] [CID] [WEIGHT] [W] [H]
/xdid -l dcx 4 root $chr(9) +pv 0 1 0 0
/xdid -l dcx 4 root 1 2 $chr(9) +fi 7 1 200 300
/xdid -l dcx 4 space 1 $chr(9) + 5 5 5 5
COMMAND Layout command.
clear Clears all CLA rules.
root Sets the root cell element.
cell Adds a cell element as a child of another cell element.
space Sets the space padding around a cell element.
update Updates the cell layout (must be used after adding rules or changing padding settings to refresh display).
PATH Cell Path from root element (can be root to point to root element).
+FLAGS Flags to manipulate Cell Layout Algorithm.
f Creates a fixed cell element.
h Creates a width fixed cell if used with +f or a horizontal cell pane if used with +p.
i Indicates that the supplied control ID is valid and is the child control when used with +f or +l.
l Creates a fill cell element.
p Creates a pane cell element.
v Creates a height fixed cell if used with +f or a vertical cell pane if used with +p.
w When used, it means that the supplied W and H represent the fixed cell width in the applicable direction (if the fixed cell is fixed in width, height or both).
CID ID of the control (used with fixed or fill cells - use 0 if no control is to be linked to the cell).
WEIGHT Cell child weight. (used when adding a child cell to a pane cell)
W Fixed width of control (used with fixed cell).
H Fixed height of control. (used with fixed cell)
  • See the Cell Layout Algorithm explanation for concrete examples.
  • If you use the update command in the init event of a dialog, you will have to use ".timer 1 0 xdialog -l dialog update" as a glitch with XP and themes disabled prevents windows from appearing. The timer corrects this problem.
  • When using the space command, the ID WEIGHT W H are in fact the LEFT TOP RIGHT BOTTOM spacings
  • Use the value 0 for the fields not used as the command expects them to be filled even though they aren't used.

/xdid -t
This command lets you set the group box text.
/xdid -t [DNAME] [ID] (TEXT)
/xdid -t dcx 4 Group Box Text

$xdid() Properties
The $xdid identifier is a given mIRC alias that communicates with the DCX DLL to extract information in DCX controls.
This property lets you retreive interior frame box size that clears the box border and text.
$xdid(dialog, ID).inbox
$xdid(dcx, 4).inbox
Note. The return value is X Y W H.

This property lets you retreive the group box text.
$xdid(dialog, ID).text
$xdid(dcx, 4).text

Box Events
These events are fired when activity occurs in the Box control.
When the checkbox has been clicked.
/cb_alias DNAME checkchange ID STATE
/cb_alias dcx checkchange 4 1
STATE The state which the checkbox will change to. 1 for checked or 0 for unchecked.
Returnnochange to cancel automatic enabling/disabling of the child controls in the box.

When the left mouse button is double clicked.
/cb_alias DNAME dclick ID
/cb_alias dcx dclick 4

Launched when you click on a control using the ? contexthelp button.
/cb_alias DNAME help ID
/cb_alias dcx help 4

When the left mouse button is clicked down.
/cb_alias DNAME lbdown ID
/cb_alias dcx lbdown 4

When the left mouse button is released.
/cb_alias DNAME lbup ID
/cb_alias dcx lbup 4

When the right mouse button is clicked.
/cb_alias DNAME rclick ID
/cb_alias dcx rclick 4

When the left mouse button is clicked and released.
/cb_alias DNAME sclick ID
/cb_alias dcx sclick 4

© 2005-2007 Last Updated: 25th December, 07