| Home | Download | Forum | Bug Tracker

|  | v1.4.0

Controls
The DCX supported controls are extended controls built directly on the DCX marked dialog. These are used to extend the capabilities of the existing controls in mIRC dialogs which are very limited in use for GUI design. DCX's /xdid commands now support multiple control IDs, similarly to mIRC's syntax: /xdid [cmd] id-id [options] and /xdid [cmd] id,id-id [options]. Note: Please note that some features of some DCX controls are only available to Windows XP+ machines. These commands have the symbol (OperatingSystem+) beside their listing.
Control Styles
These general control styles are available when creating any DCX control.
disabled | The control is created disabled.
group | Specifies the first control of a group of controls. The group consists of this first control and all controls defined after it, up to the next control with the group style. The first control in each group usually has the tabstop style so that the user can move from group to group. The user can subsequently change the keyboard focus from one control in the group to the next control in the group by using the direction keys.
hidden | The control is not visible.
notheme | Removes XP Themes on controls.
tabstop | Specifies a control that can receive the keyboard focus when the user presses the TAB key. Pressing the TAB key changes the keyboard focus to the next control with the tabstop style.
transparent | Does not draw the control background so the parent background will show through. (Applies to all controls but only some controls will actually process this style)
/xdid flags
These are general DCX control commands which apply to any DCX control.
/xdid -b
This command lets you disable the control.
Syntax: | /xdid -b [DNAME] [ID]
Example: | /xdid -b dcx 4
/xdid -e
This command lets you enable the control.
Syntax: | /xdid -e [DNAME] [ID]
Example: | /xdid -e dcx 4
/xdid -f
This command lets you change a control font.
Syntax: | /xdid -f [DNAME] [ID] [+FLAGS] [CHARSET] [SIZE] [FONTNAME]
Example: | /xdid -f dcx 4 +abs ansi 10 Tahoma
Parameters:
+FLAGS | Font style flags.
a | Font is anti-aliased.
b | Font is bold.
d | Default font.
i | Font is italic.
s | Font is strikedout.
u | Font is underlined.
CHARSET | Can be any of the following: ansi, baltic, chinesebig, default, easteurope, gb2312, greek, hangul, mac, oem, russian, shiftjis, symbol, turkish, or vietnamese.
SIZE | Font size in points.
FONTNAME | Font name. Ex: Tahoma, Courier New, Arial, ...
Note. Font names are limited to 31 chars (system definition). When using +d, CHARSET SIZE and FONTNAME can be omitted.
/xdid -h
This command lets you hide the control.
Syntax: | /xdid -h [DNAME] [ID] (+FLAGS) (DELAY)
Example: | /xdid -h dcx 4 +c 1000 /xdid -h dcx 4 +ov 300
Parameters:
+FLAGS | Animation style flags.
b | Alpha-Blending fade effect.
c | Makes the control appear to collapse inward.
o | Animates the control from left to right. This flag can be used with roll or slide animation. It is ignored when used with +c.
n | Animates the control from right to left. This flag can be used with roll or slide animation. It is ignored when used with +c.
s | Uses slide animation. It is ignored when used with +c.
v | Animates the control from top to bottom. This flag can be used with roll or slide animation. It is ignored when used with +c.
u | Animates the control from bottom to top. This flag can be used with roll or slide animation. It is ignored when used with +c.
DELAY | Delay in millseconds of the animation. (typical system value is 200)
Note. The default effect is a roll animation. Animation on region clipped controls will fail on operating systems prior to XP.
/xdid -p
This command lets you move/resize the control.
Syntax: | /xdid -p [DNAME] [ID] [X] [Y] [W] [H]
Example: | /xdid -p dcx 4 10 10 200 120
Parameters:
X | X position of control.
Y | Y position of control.
W | Width of control.
H | Height of control.
Note. This command will send a sizing event.
/xdid -s
This command lets you show the control.
Syntax: | /xdid -s [DNAME] [ID] (+FLAGS) (DELAY)
Example: | /xdid -s dcx 4 +c 1000 /xdid -s dcx 4 +nu 300
Parameters:
+FLAGS | Animation style flags.
b | Alpha-Blending fade effect.
c | Makes the control appear to expand outward.
o | Animates the control from left to right. This flag can be used with roll or slide animation. It is ignored when used with +c.
n | Animates the control from right to left. This flag can be used with roll or slide animation. It is ignored when used with +c.
s | Uses slide animation. It is ignored when used with +c.
v | Animates the control from top to bottom. This flag can be used with roll or slide animation. It is ignored when used with +c.
u | Animates the control from bottom to top. This flag can be used with roll or slide animation. It is ignored when used with +c.
DELAY | Delay in millseconds of the animation. (typical system value is 200)
Note. The default effect is a roll animation. Animation on region clipped controls will fail on operating systems prior to XP.
/xdid -x
This command lets you modify the border styles of the control.
Syntax: | /xdid -x [DNAME] [ID] [+FLAGS]
Example: | /xdid -x dcx 4 +w
Parameters:
+FLAGS | Border style flags.
b | Regular Border.
c | Clientedge border.
d | Dialog frame border.
f | Dialog modal frame border. (Similar to +d)
s | Staticedge border.
w | Windowedge border.
/xdid -C
This command lets you modify the colors of the control.
Syntax: | /xdid -C [DNAME] [ID] [+FLAGS] [COLOR]
Example: | /xdid -C dcx 4 +bk $rgb(0,0,255)
Parameters:
+FLAGS | Color Flags.
b | Background color. Affects: Edit, Radio, Check, Box, Scroll, Text, List, Panel, Image, Trackbar
g | Sets the start gradient color.
G | Sets the end gradient color.
k | Text background Color. Affects: Text, Edit, List
r | Border color. Affects: Box (only with rounded style)
t | Text color. Affects: Text, Edit, List, Box
Note. When using +b on the trackbar, call /xdid -U on the control to force a redraw. /xdialog -j will not work. This is an API bug.
/xdid -F
This command lets you set the focus on the control.
Syntax: | /xdid -F [DNAME] [ID]
Example: | /xdid -F dcx 4
/xdid -J
This command lets you change the dialog cursor.
Syntax: | /xdid -J [DNAME] [ID] [+FLAGS] [CURSOR|FILENAME]
Example: | /xdid -J dcx 4 +r wait
Parameters:
+FLAGS | Cursor flags.
f | Cursor is defined in FILENAME
r | Cursor is a system cursor name in the list below.
CURSOR | Cursor system names
appstarting | Standard arrow and small hourglass
arrow | Standard arrow.
cross | Crosshair.
hand | Hand.
help | Arrow and question mark.
ibeam | I-beam.
no | Slashed circle.
sizeall | Four-pointed arrow pointing north, south, east, and west.
sizenesw | Double-pointed arrow pointing northeast and southwest.
sizens | Double-pointed arrow pointing north and south.
sizenwse | Double-pointed arrow pointing northwest and southeast.
sizewe | Double-pointed arrow pointing west and east.
uparrow | Vertical arrow.
wait | Hourglass.
FILENAME | Filename containing the cursor.
Note. Cursor files need to be .cur or .ani. You can't change the cursor on the divider control.
/xdid -M
This command lets you add additional information to a control that can be retrieved later.
Syntax: | /xdid -M [DNAME] [ID] [INFO]
Example: | /xdid -M dcx 4 Mark info here
/xdid -R
This command lets you clip the control region.
Syntax: | /xdid -R [DNAME] [ID] [+FLAGS] (ARGS)
Example: | /xdid -R dcx 4 +f $rgb(255,0,255) control_shape.bmp /xdid -R dcx 4 +c
Parameters:
+FLAGS | Region flags.
f | Region is defined in bitmap file. The bitmap is resized to match control size before the region is applied if +R is supplied.
o | OR new region with existing one. (Can be used with c, p or r)
a | AND new region with existing one. (Can be used with c, p or r)
i | DIFF new region with existing one. (Can be used with c, p or r)
x | XOR new region with existing one. (Can be used with c, p or r)
c | Sets an ellipse region.
p | Sets a polygon region.
r | Sets a rounded rectangle region.
n | Resets the region.
b | Sets the alpha blending state of the control.
Variable parameters ARGS:
b | [1|0] [VALUE]
VALUE | The opacity of the control. This can be a value between 0-255.
f | [TRANSPARENT_COLOR] [FILENAME]
TRANSPARENT_COLOR | The color in the image which is made transparent. Use -1 to have no transparent color.
p | x1,y1 x2,y2 x3,y3 ... x12,y12
COORDINATES | A list of at least 3 coordinates, each coordinate in the format of X,Y.
r | (ROUNDNESS)
ROUNDNESS | An integer defining how round the rectangle should be.
/xdid -T
This command lets you set the tooltip information for controls that support tooltips.
Syntax: | /xdid -T [DNAME] [ID] [TEXT]
Example: | /xdid -T dcx 4 This is the tooltip text
Note. You must call /xdialog -T to create the tooltip before you can use tooltips with any control. (Except controls which naturally have their own tooltips, such as treeview, listview, toolbar, etc) The listview has its own /xdid -T command.
/xdid -U
This command lets you remove focus from the control.
Syntax: | /xdid -U [DNAME] [ID]
Example: | /xdid -U dcx 4
/xdid -Z
This command lets you scroll a control in the vertical direction where POS is a percentage expressing the area to scroll (0 being top and 100 being bottom).
Syntax: | /xdid -Z [DNAME] [ID] [POS]
Example: | /xdid -Z dcx 4 50
Note. This behaviour only affects the listview control in report mode. We are working on a fix for the other modes.
$xdid() Properties
The $xdid identifier is a given mIRC alias that communicates with the DCX DLL to extract information in DCX controls.
$xdid().alpha
This property returns $true if the control is using the alpha style.
Syntax: | $xdid(dialog, ID).alpha
Example: | $xdid(dcx, 4).alpha
$xdid().bgcolor
This property retrieves the background color.
Syntax: | $xdid(dialog, ID).bgcolor
Example: | $xdid(dcx, 4).bgcolor
$xdid().dpos
This property retrieves the position and size of a control in the format [X] [Y] [W] [H] relative to the dialog.
Syntax: | $xdid(dialog, ID).dpos
Example: | $xdid(dcx, 4).dpos
$xdid().enabled
This property retrieves if a control is enabled or disabled.
Syntax: | $xdid(dialog, ID).enabled
Example: | $xdid(dcx, 4).enabled
$xdid().font
This property returns the font used for writing on the control.
Syntax: | $xdid(dialog, ID).font
Example: | $xdid(dcx, 4).font
Note. The return value is in the format +flags charset size fontname, where +flags is specfied in /xdid -f
$xdid().hwnd
This property retrieves the window handle (HWND) of a control.
Syntax: | $xdid(dialog, ID).hwnd
Example: | $xdid(dcx, 4).hwnd
$xdid().mark
This property retrieves the additional info given to a control with /xdid -M.
Syntax: | $xdid(dialog, ID).mark
Example: | $xdid(dcx, 4).mark
$xdid().mouse
This property retrieves the mouse position from the control viewpoint.
Syntax: | $xdid(dialog, ID).mouse
Example: | $xdid(dcx, 4).mouse
$xdid().pid
This property retrieves the control ID of the parent of a control (0 if a dialog is the parent).
Syntax: | $xdid(dialog, ID).pid
Example: | $xdid(dcx, 4).pid
$xdid().pos
This property retrieves the position and size of a control in the format [X] [Y] [W] [H] relative to the parent (which can be the dialog).
Syntax: | $xdid(dialog, ID).pos
Example: | $xdid(dcx, 4).pos
$xdid().textbgcolor
This property retrieves the text bcakground color.
Syntax: | $xdid(dialog, ID).textbgcolor
Example: | $xdid(dcx, 4).textbgcolor
$xdid().textcolor
This property retrieves the text color.
Syntax: | $xdid(dialog, ID).textcolor
Example: | $xdid(dcx, 4).textcolor
$xdid().tooltipbgcolor
This property retrieves the tooltip background color.
Syntax: | $xdid(dialog, ID).tooltipbgcolor
Example: | $xdid(dcx, 4).tooltipbgcolor
$xdid().tooltiptextcolor
This property retrieves the tooltip text color.
Syntax: | $xdid(dialog, ID).tooltiptextcolor
Example: | $xdid(dcx, 4).tooltiptextcolor
$xdid().type
This property retrieves the control type.
Syntax: | $xdid(dialog, ID).type
Example: | $xdid(dcx, 4).type
$xdid().visible
This property retrieves if a control is visible or hidden.
Syntax: | $xdid(dialog, ID).visible
Example: | $xdid(dcx, 4).visible
Controls Events
These events are fired when activity occurs in the Controls control.
focus
Triggered when a control gains the focus where $3 is the control ID.
Syntax: | /cb_alias DNAME focus ID
Example: | /cb_alias dcx focus 4
focusout
Triggered when a control loses the focus where $3 is the control ID.
Syntax: | /cb_alias DNAME focusout ID
Example: | /cb_alias dcx focusout 4
mouse
When the mouse hovers a control where $3 is the ID of the control.
Syntax: | /cb_alias DNAME mouse ID
Example: | /cb_alias dcx mouse 4
mouseenter
When the mouse enters a control where $3 is the ID of the control.
Syntax: | /cb_alias DNAME mouseenter ID
Example: | /cb_alias dcx mouseenter 4
mouseleave
When the mouse leaves a control where $3 is the ID of the control.
Syntax: | /cb_alias DNAME mouseleave ID
Example: | /cb_alias dcx mouseleave 4
mwheel
Event triggered when the mouse wheel is scrolled.
Syntax: | /cb_alias DNAME mwheel ID +FLAGS DIRECTION
Example: | /cb_alias dcx mwheel 4 +cs up
Parameters:
+FLAGS | Keystate flags during scroll.
c | Control key.
l | Left mouse button.
m | Middle mouse button.
r | Right mouse button.
s | Shift key.
DIRECTION | The direction which the wheel is scrolling.
up | Upwards.
down | Downwards.
sizing
When the control is resized, where $3 is the new width and $4 is the new height.
Syntax: | /cb_alias DNAME sizing ID W H
Example: | /cb_alias dcx sizing 4 90 60
| Control Styles disabled group hidden notheme tabstop transparent /xdid Flags -b -e -f -h -p -s -x -C -F -J -M -R -T -U -Z $xdid() Properties alpha bgcolor dpos enabled font hwnd mark mouse pid pos textbgcolor textcolor tooltipbgcolor tooltiptextcolor type visible Events focus focusout mouse mouseenter mouseleave mwheel sizing

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