DCX - Dialog Control Xtension
v1.4.0
Box
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.
 
Note.
  • 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.
Syntax:
/xdid -c [DNAME] [ID] [CID] [CONTROL] [X] [Y] [W] [H] (OPTIONS)
Example:
/xdid -c dcx 4 12 richedit 10 10 400 25 multi
Parameters:
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.
Syntax:
/xdid -d [DNAME] [ID] [CID]
Example:
/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.
Syntax:
/xdid -l [DNAME] [ID] [COMMAND] [PATH] [TAB] [+FLAGS] [CID] [WEIGHT] [W] [H]
Example:
/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
Parameters:
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)
 
Note.
  • 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.
Syntax:
/xdid -t [DNAME] [ID] (TEXT)
Example:
/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.
$xdid().inbox
This property lets you retreive interior frame box size that clears the box border and text.
Syntax:
$xdid(dialog, ID).inbox
Example:
$xdid(dcx, 4).inbox
 
Note. The return value is X Y W H.

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

Box Events
These events are fired when activity occurs in the Box control.
checkchange
When the checkbox has been clicked.
Syntax:
/cb_alias DNAME checkchange ID STATE
Example:
/cb_alias dcx checkchange 4 1
Parameters:
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.

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

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

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

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

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

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

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

Valid XHTML 1.0 Transitional Valid CSS!