DCX - Dialog Control Xtension
 
Button
This control enables you to create a button control.

Control Styles
These control styles are available when creating a Button 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 Bitmap buttons get alpha blending.
bitmap Button is drawed using supplied bitmaps.
default Button has default focus.
hgradient Draws a horizontal gradient with the colors specified.
noformat Disables support for mIRC codes in control (faster).
shadow Display text with a shadow.
tooltips The button will have a tooltip.
vgradient Draws a vertical gradient with the colors specified.
 
Note. 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_BTNTEXT) 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 change the caption color for the button.
Syntax:
/xdid -c [DNAME] [ID] [+FLAGS] [COLOR]
Example:
/xdid -c dcx 4 +nd $rgb(255,0,255)
Parameters:
+FLAGS State flags
d Disabled state color.
h Hovering state color.
n Normal state color.
s Selected state color.

/xdid -k
This command lets you change the transparency color for the bitmap image for the button.
Syntax:
/xdid -k [DNAME] [ID] [+FLAGS] [COLOR] [FILENAME]
Example:
/xdid -k dcx 4 +nd $rgb(255,0,255) C:/mIRC/start.bmp
Parameters:
+FLAGS State flags
d Disabled state transparent color/image.
h Hovering state transparent color/image.
n Normal state transparent color/image.
s Selected state transparent color/image.
COLOR Transparency color of the bitmap styled button.
FILENAME Bitmap filename.
 
Note. As from DCX v1.3.4, this no longer defines the caption color for the button control. This functionality was moved to /xdid -c

/xdid -l
This command lets you set the icon size of the button and clear the image list. SIZE can be 16, 24 or 32. (Not used for bitmap button)
Syntax:
/xdid -l [DNAME] [ID] [SIZE]
Example:
/xdid -l dcx 4 32

/xdid -m
This command lets you enable text on a bitmap button.
Syntax:
/xdid -m [DNAME] [ID] [ENABLED]
Example:
/xdid -m dcx 4 1
Parameters:
ENABLED Value to enable bitmap button text or not.
0 Text is not drawn upon a bitmap button.
1 Text is drawn upon a bitmap button.

/xdid -t
This command lets you set the button caption text. (Not used for bitmap button)
Syntax:
/xdid -t [DNAME] [ID] (TEXT)
Example:
/xdid -t dcx 4 Button text

/xdid -w
This command lets you add an icon to the button image list.
Syntax:
/xdid -w [DNAME] [ID] [+FLAGS] [INDEX] [FILENAME]
Example:
/xdid -w dcx 4 +ng 113 shell32.dll
Parameters:
+FLAGS Icon flags
d Disabled icon.
h Hovering icon.
n Normal icon.
s Selected icon.
a Uses the icon associated with the given file (as shown in Windows Explorer).
Note: File must exist.
f Uses the icon associated with the given filetype.
Note: Filename is the extension (eg. BMP, PNG, AVI, etc).
g Convert to grayscale icon.
P If GDI+ is enabled, this will use GDI+ to extract the icon.
INDEX Icon index in icon archive
FILENAME Icon archive filename
 
Note.
  • The first icon added will be used for ALL button icon states, unless changed manually.
  • Use 0 for INDEX if the file is a single icon file.

$xdid() Properties
The $xdid identifier is a given mIRC alias that communicates with the DCX DLL to extract information in DCX controls.
$xdid().text
This property lets you retreive the button caption text.
Syntax:
$xdid(dialog, ID).text
Example:
$xdid(dcx, 4).text

Button Events
These events are fired when activity occurs in the Button control.
dclick
When you double-click on the button.
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 you right-click on the button.
Syntax:
/cb_alias DNAME rclick ID
Example:
/cb_alias dcx rclick 4

sclick
When you left-click on the button.
Syntax:
/cb_alias DNAME sclick ID
Example:
/cb_alias dcx sclick 4

Contact � 2005-2009 Last Updated: 12th July, 09

Valid XHTML 1.0 Transitional Valid CSS!