DCX - Dialog Control Xtension
 
ToolBar
This control enables you to create a toolbar.

Control Styles
These control styles are available when creating a ToolBar 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.
arrows Displays a dropdown arrow on the buttons having the +v flag set.
bottom The toolbar is auto-positioned at bottom of dialog window.
flat Toolbar style is flat with buttons having a hot mode (hover). This style also includes the transparent style.
left Toolbar is auto-positioned to the left side of the dialog (makes the toolbar vertical).
list Toolbar item text is to the right of the icon.
noauto Prevents the toolbar from being auto-positioned and resized by the parent window. The user will be responsible for the positioning and resizing of the toolbar.
nodivider The 2 pixel line divider is not included in the toolbar.
right Toolbar is auto-positioned to the right side of the dialog (makes the toolbar vertical).
tooltips Toolbar items support tooltips.
top The toolbar is auto-positioned at top of dialog window.
wrap Toolbar can have multiple lines of buttons. Toolbar buttons "break" off to the next line when the toolbar becomes too narrow to include all buttons on the same line. The break will occur on the rightmost separator item or the rightmost button if there are no separators on the bar.

/xdid flags
Control commands are input to the control with the /xdid command.
/xdid -a
This command lets you add an item to the toolbar.
Syntax:
/xdid -a [DNAME] [ID] [N] [+FLAGS] [WIDTH] [ICON] [COLOR] (Button Text) [TAB] (Tooltip Text)
Example:
/xdid -a dcx 4 1 +cv 100 1 $rgb(255,0,0) Button $chr(9) Tooltip
Parameters:
N Button index number.
+FLAGS Item flags.
a The button is auto-sized to fit in the icon and text.
b The button text is bold. (Only works with XP themes disabled)
c The button text is colored, defined by COLOR. (Only works with XP themes disabled)
d The button is disabled.
g The button is part of a checkgroup (radio checks) (used with -k flag).
h The button is hidden (but still part of the toolbar).
i The button is in indeterminate state (greyed out).
k The button acts like a checkbox.
l Specifies that WIDTH is the button width.
p The button appears like pressed.
u Item text is underlined. (Only works with XP themes disabled)
v The button acts like a dropdown button. (If the arrows style is specified, a dropdown arrow will be drawn beside the button)
w The button after (and all other buttons following) a button with this style will be forced to the next line.
x The button is checked.
WIDTH Button width (Use 0 if not used).
ICON Icon displayed when item is not selected.
COLOR Toolbar button text color (Only works with XP themes disabled).
 
Note.
  • Button Text and Tooltip Text parameters are optional.
  • If Button Text is '-' the button will be a separator item.
  • If the button is a separator item, the value used for ICON will be the separator width in pixels.
  • Icons must be added before it can be used in the toolbar. (see /xdid -l)
  • Colors will only work if the computer has no visual styles applied (XP themes). To use this on machines with visual styles enabled, apply the notheme style.

/xdid -c
This command lets you change the Nth toolbar button (or tooltip) colors and text styles.
Syntax:
/xdid -c [DNAME] [ID] [N] [+FLAGS] [COLOR]
Example:
/xdid -c dcx 4 3 +bc $rgb(0,0,255)
Parameters:
N The index of the button to modify.
+FLAGS Properties to set to the button.
b The text is bold.
c The text is in a color defined by COLOR.
u The text is underlined.
x The background color of the toolbar tooltip.
z The text color of the toolbar tooltip.
COLOR The color to assign the button (or tooltip)
 
Note. When using flags +x and +z, you MUST use N to be 0.

/xdid -d
This command lets you delete the Nth toolbar button.
Syntax:
/xdid -d [DNAME] [ID] [N]
Example:
/xdid -d dcx 4 6

/xdid -i
This command lets you change the Nth toolbar button icon.
Syntax:
/xdid -i [DNAME] [ID] [N] [ICON]
Example:
/xdid -i dcx 4 7 2
 
Note. Use 0 for no icon.

/xdid -j
This command lets you set the minimum and maximum width of toolbar buttons.
Syntax:
/xdid -j [DNAME] [ID] [MIN] [MAX]
Example:
/xdid -j dcx 4 50 100
 
Note. Only applies on toolbars with the list style set.

/xdid -l
This command lets you set the icon size of the toolbar image lists.
Syntax:
/xdid -l [DNAME] [ID] [SIZE]
Example:
/xdid -l dcx 4 16
Parameters:
SIZE Image list image size
16 Icons are 16x16 pixels.
24 Icons are 24x24 pixels.
32 Icons are 32x32 pixels.
 
Note.
  • This command can also be used to clear the images lists.
  • This command must be issued before adding icons to the toolbar image lists.

/xdid -m
This command lets you toggle the toolbar autostretch feature. This feature resizes automatically the toolbar buttons to stretch the full width of the toolbar when the control width changes. Does not work on vertical toolbars.
Syntax:
/xdid -m [DNAME] [ID] [1|0]
Example:
/xdid -m dcx 4 1

/xdid -q
This command lets you change the Nth button tooltip text.
Syntax:
/xdid -q [DNAME] [ID] [N] (TEXT)
Example:
/xdid -q dcx 4 2 New TipText
 
Note. TEXT is optional.

/xdid -r
This command lets you clear all the toolbar items.
Syntax:
/xdid -r [DNAME] [ID]
Example:
/xdid -r dcx 4

/xdid -t
This command lets you change the state of a toolbar button.
Syntax:
/xdid -t [DNAME] [ID] [N] [+FLAGS]
Example:
/xdid -t dcx 4 2 +d
Parameters:
N Button index number
+FLAGS Item flags.
d The button is disabled.
h The button is hidden (but still part of the toolbar).
i The button is in indeterminate state (greyed out).
p The button appears like pressed.
w The button after (and all other buttons following) a button with this style will be forced to the next line.
x The button is checked.
 
Note. A flags value of + resets the button to it's normal state.

/xdid -u
This command lets change the toolbar default button size.
Syntax:
/xdid -u [DNAME] [ID] [WIDTH] [HEIGHT]
Example:
/xdid -u dcx 4 20 15

/xdid -v
This command lets you change the Nth button text (text is optional).
Syntax:
/xdid -v [DNAME] [ID] [N] (TEXT)
Example:
/xdid -v dcx 4 2 New Text

/xdid -w
This command lets you add an icon to the toolbar image lists.
Syntax:
/xdid -w [DNAME] [ID] [+FLAGS] [INDEX] [FILENAME]
Example:
/xdid -w dcx 4 +n 113 shell32.dll
Parameters:
+FLAGS Image list flags.
d Disabled icon list.
n Normal icon list.
h Hottrack icon list.
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. 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().dropdownpoint
This property lets you retreive the coordinates of the Nth toolbar button. These coordinates can be used to position a dropdown menu without the use of the dropdown event.
Syntax:
$xdid(dialog, ID, N).dropdownpoint
Example:
$xdid(dcx, 4, 3).dropdownpoint

$xdid().icon
This property lets you retreive the Nth button icon.
Syntax:
$xdid(dialog, ID, N).icon
Example:
$xdid(dcx, 4, 1).icon

$xdid().mouseitem
Returns the item which the mouse is currently over.
Syntax:
$xdid(dialog, ID).mouseitem
Example:
$xdid(dcx, 4).mouseitem
 
Note. Returns -1 when mouse is not over an item, or is currently over a disabled item.

$xdid().num
This property lets you retreive the total number of buttons on the toolbar.
Syntax:
$xdid(dialog, ID).num
Example:
$xdid(dcx, 4).num

$xdid().state
This property lets you retreive the state of the Nth toolbar button. The flags returned are in the same format specified in /xdid -t.
Syntax:
$xdid(dialog, ID, N).state
Example:
$xdid(dcx, 4, 6).state

$xdid().text
This property lets you retreive the Nth button text.
Syntax:
$xdid(dialog, ID, N).text
Example:
$xdid(dcx, 4, 1).text

$xdid().tooltip
This property lets you retreive the Nth toolbar button tooltip.
Syntax:
$xdid(dialog, ID, N).tooltip
Example:
$xdid(dcx, 4, 1).tooltip

$xdid().tooltipbgcolor
This property lets you retreive the tooltip background color.
Syntax:
$xdid(dialog, ID).tooltipbgcolor
Example:
$xdid(dcx, 4).tooltipbgcolor

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

ToolBar Events
These events are fired when activity occurs in the ToolBar control.
dropdown
When a dropdown button (or arrow if arrow style is set) event is fired on a button.
Syntax:
/cb_alias DNAME dropdown ID BTN_ID Bottom_X Bottom_Y Top_X Top_Y
Example:
/cb_alias dcx dropdown 4 10 586 73 586 27
Parameters:
BTN_ID Button that triggered the event.
Bottom_X Coordinates of a possible popup menu aligned under the button where the dropdown was fired.
Bottom_Y Coordinates of a possible popup menu aligned under the button where the dropdown was fired.
Top_X Coordinates of a possible popup menu aligned over the button where the dropdown was fired.
Top_Y Coordinates of a possible popup menu aligned over the button where the dropdown was fired.

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

rclick
When a the right mouse button is clicked over a button.
Syntax:
/cb_alias DNAME rclick ID BTN_ID Bottom_X Bottom_Y Top_X Top_Y
Example:
/cb_alias dcx rclick 4 3 165 73 165 27
Parameters:
BTN_ID Button that triggered the event.
Bottom_X Coordinates of a possible popup menu aligned under the button where the rclick was fired.
Bottom_Y Coordinates of a possible popup menu aligned under the button where the rclick was fired.
Top_X Coordinates of a possible popup menu aligned over the button where the rclick was fired.
Top_Y Coordinates of a possible popup menu aligned over the button where the rclick was fired.

sclick
When a button is clicked.
Syntax:
/cb_alias DNAME sclick ID BTN_ID
Example:
/cb_alias dcx sclick 4 2

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

Valid XHTML 1.0 Transitional Valid CSS!