DCX - Dialog Control Xtension
 
XDock
XDock is the complete rewrite of UltraDock. It handles docking of all types of windows and customisation of behaviour upon resizing.

/xdock Commands
The /xdock command is used to force the positioning of a window within another window, with specific behaviour.
/xdock -b
This command docks a window to the mIRC TreeBar.
Syntax:
/xdock -b [HWND_DOCK] [+FLAGS]
Example:
/xdock -b $dialog(dcx).hwnd +h
Parameters:
HWND_DOCK The HWND of the window you wish to dock.
+FLAGS Flags for docking into the mIRC TreeBar.
s Docked window will be resized to fit its parent width & height automatically.
h Docked window will be resized to fit its parent width automatically.
v Docked window will be resized to fit its parent height automatically.
n Docked window will not be resized automatically.
o Uses the old style treebar docking. This is when the docked window is on top of the treeview control within treebar.
 
Note. Dialogs should not be docked within the INIT event as they are not yet visible. This can be fixed by using a timer.

/xdock -c
This command docks a window to a custom window (channel, query, custom, or status windows).
Syntax:
/xdock -c [HWND_DOCK] [+FLAGS] [DESTINATION]
Example:
/xdock -c $dialog(dcx).hwnd +h $query(ClickHeRe).hwnd
Parameters:
HWND_DOCK The HWND of the window you wish to dock.
+FLAGS Flags for docking into a custom window.
s Docked window will be resized to fit its parent width & height automatically.
h Docked window will be resized to fit its parent width automatically.
v Docked window will be resized to fit its parent height automatically.
n Docked window will not be resized automatically.
DESTINATION The HWND of the window that you wish to dock your window into.
 
Note. Dialogs should not be docked within the INIT event as they are not yet visible. This can be fixed by using a timer.

/xdock -m
This command docks a window to your mIRC window.
Syntax:
/xdock -m [HWND_DOCK] [+FLAGS]
Example:
/xdock -m $dialog(dcx).hwnd +r
Parameters:
HWND_DOCK The HWND of the window you wish to dock.
+FLAGS Flags for docking into a mIRC window.
t Docks the window to the top.
b Docks the window to the bottom.
l Docks the window to the left.
r Docks the window to the right.
 
Note. Dialogs should not be docked within the INIT event as they are not yet visible. This can be fixed by using a timer.

/xdock -n
This command docks a window to a nicklist listbox.
Syntax:
/xdock -n [HWND_DOCK] [+FLAGS] [DESTINATION]
Example:
/xdock -n $dialog(dcx).hwnd +h $channel(#help).hwnd
Parameters:
HWND_DOCK The HWND of the window you wish to dock.
+FLAGS Flags for docking into a custom window.
b Disable the nicklist scrollbar.
s Docked window will be resized to fit its parent width & height automatically.
h Docked window will be resized to fit its parent width automatically.
v Docked window will be resized to fit its parent height automatically.
n Docked window will not be resized automatically.
DESTINATION The HWND of the channel window that you wish to dock your window into.
 
Note. Dialogs should not be docked within the INIT event as they are not yet visible. This can be fixed by using a timer.

/xdock -p
This command forces mIRC to update its docked windows.
Syntax:
/xdock -p
Example:
/xdock -p

/xdock -r
This command resizes a docked window.
Syntax:
/xdock -r [HWND_DOCK] [+FLAGS] [WIDTH] [HEIGHT]
Example:
/xdock -r $dialog(dcx).hwnd + 250 3000
Parameters:
HWND_DOCK The HWND of the window you wish to resize.
+FLAGS There are currently no flags.
WIDTH The width that the window will be set to.
HEIGHT The height that the window will be set to.
 
Note.
  • If the window is docked in a top or bottom position, then WIDTH will be ignored.
  • If the window is docked in a left or right position, then HEIGHT will be ignored.

/xdock -s
This command docks a window to the mIRC SwitchBar.
Syntax:
/xdock -s [HWND_DOCK] [+FLAGS]
Example:
/xdock -s $dialog(dcx).hwnd +v
Parameters:
HWND_DOCK The HWND of the window you wish to dock.
+FLAGS Flags for docking into the mIRC SwitchBar.
s Docked window will be resized to fit its parent width & height automatically.
h Docked window will be resized to fit its parent width automatically.
v Docked window will be resized to fit its parent height automatically.
n Docked window will not be resized automatically.
 
Note. Dialogs should not be docked within the INIT event as they are not yet visible. This can be fixed by using a timer.

/xdock -t
This command docks a window to the mIRC ToolBar.
Syntax:
/xdock -t [HWND_DOCK] [+FLAGS]
Example:
/xdock -t $dialog(dcx).hwnd +v
Parameters:
HWND_DOCK The HWND of the window you wish to dock.
+FLAGS Flags for docking into the mIRC ToolBar.
s Docked window will be resized to fit its parent width & height automatically.
h Docked window will be resized to fit its parent width automatically.
v Docked window will be resized to fit its parent height automatically.
n Docked window will not be resized automatically.
 
Note. Dialogs should not be docked within the INIT event as they are not yet visible. This can be fixed by using a timer.

/xdock -u
This command undocks a window.
Syntax:
/xdock -u [HWND_DOCK] [+FLAGS]
Example:
/xdock -u $dialog(dcx).hwnd +
Parameters:
HWND_DOCK The HWND of the window you wish to undock.
 
Note. There are currently no flags, but the + character is required for DCX prior to v1.3.8

/xdock -M
This command shows/hides the Menubar.
Syntax:
/xdock -M [1|0]
Example:
/xdock -M 0

/xdock -R
This command shows/hides the Treebar.
Syntax:
/xdock -R [1|0]
Example:
/xdock -R 0

/xdock -S
This command shows/hides the Switchbar.
Syntax:
/xdock -S [1|0]
Example:
/xdock -S 0

/xdock -T
This command shows/hides the Toolbar.
Syntax:
/xdock -T [1|0]
Example:
/xdock -T 0

$xdock Properties
The $xdock identifier is used to retrieve docking information about windows and various mIRC components.
$xdock().dockSide
Returns the side which the dialog is docked.
Syntax:
$xdock(HWND).dockSide
Example:
$xdock($dialog(dcx).hwnd).dockSide
Parameters:
SIDE Possible return values.
top The window is docked in the top position.
bottom The window is docked in the bottom position.
left The window is docked in the left position.
right The window is docked in the right position.

$xdock().hasDocked
Determines if the specified window/dialog has a docked window/dialog within it.
Syntax:
$xdock(HWND).hasDocked
Example:
$xdock($dialog(dcx).hwnd).hasDocked

$xdock().isAutoH
Returns $true if the docked window automatically resizes horizontally.
Syntax:
$xdock(HWND).isAutoH
Example:
$xdock($dialog(dcx).hwnd).isAutoH

$xdock().isAutoS
Returns $true if the docked window automatically resizes both horizontally and vertically.
Syntax:
$xdock(HWND).isAutoS
Example:
$xdock($dialog(dcx).hwnd).isAutoS

$xdock().isAutoV
Returns $true if the docked window automatically resizes vertically.
Syntax:
$xdock(HWND).isAutoV
Example:
$xdock($dialog(dcx).hwnd).isAutoV

$xdock().isDocked
Determines if a window/dialog is docked.
Syntax:
$xdock(HWND).isDocked
Example:
$xdock($dialog(dcx).hwnd).isDocked

$xdock().isMenuBar
Determines if the mIRC MenuBar is visible.
Syntax:
$xdock(HWND).isMenuBar
Example:
$xdock($dialog(dcx).hwnd).isMenuBar

$xdock().isSwitchBar
Determines if the mIRC SwitchBar is visible.
Syntax:
$xdock(HWND).isSwitchBar
Example:
$xdock($dialog(dcx).hwnd).isSwitchBar

$xdock().isToolBar
Determines if the mIRC ToolBar is visible.
Syntax:
$xdock(HWND).isToolBar
Example:
$xdock($dialog(dcx).hwnd).isToolBar

$xdock().isTreeBar
Determines if the mIRC TreeBar is visible.
Syntax:
$xdock(HWND).isTreeBar
Example:
$xdock($dialog(dcx).hwnd).isTreeBar

$xdock().switchBarPos
Returns the mIRC SwitchBar dock position.
Syntax:
$xdock(HWND).switchBarPos
Example:
$xdock($dialog(dcx).hwnd).switchBarPos
Parameters:
POSITION Return values.
none The SwitchBar is not shown in mIRC.
top The SwitchBar is docked in the top position.
bottom The SwitchBar is docked in the bottom position.
left The SwitchBar is docked in the left position.
right The SwitchBar is docked in the right position.

$xdock().switchBarSize
Returns the mIRC SwitchBar size.
Syntax:
$xdock(HWND).switchBarSize
Example:
$xdock($dialog(dcx).hwnd).switchBarSize
Parameters:
DIMENSIONS Return values.
X The X-offset of the mIRC SwitchBar
Y The Y-offset of the mIRC SwitchBar
W The width of the mIRC SwitchBar.
H The height of the mIRC SwitchBar.

$xdock().text
Returns the title text for the given HWND.
Syntax:
$xdock(HWND).text
Example:
$xdock($dialog(dcx).hwnd).text

$xdock().toolBarPos
Returns the mIRC ToolBar position.
Syntax:
$xdock(HWND).toolBarPos
Example:
$xdock($dialog(dcx).hwnd).toolBarPos
Parameters:
POSITION Return values.
none The ToolBar is not shown in mIRC.
top The ToolBar is in the top position.
bottom The ToolBar is in the bottom position.
left The ToolBar is in the left position.
right The ToolBar is in the right position.

$xdock().toolBarSize
Returns the mIRC ToolBar size.
Syntax:
$xdock(HWND).toolBarSize
Example:
$xdock($dialog(dcx).hwnd).toolBarSize
Parameters:
DIMENSIONS Return values.
X The X-offset of the mIRC ToolBar
Y The Y-offset of the mIRC ToolBar
W The width of the mIRC ToolBar.
H The height of the mIRC ToolBar.

$xdock().treeBarPos
Returns the mIRC TreeBar position.
Syntax:
$xdock(HWND).treeBarPos
Example:
$xdock($dialog(dcx).hwnd).treeBarPos
Parameters:
POSITION Return values.
none The TreeBar is not shown in mIRC.
top The TreeBar is in the top position.
bottom The TreeBar is in the bottom position.
left The TreeBar is in the left position.
right The TreeBar is in the right position.

$xdock().treeBarSize
Returns the mIRC TreeBar size.
Syntax:
$xdock(HWND).treeBarSize
Example:
$xdock($dialog(dcx).hwnd).treeBarSize
Parameters:
DIMENSIONS Return values.
X The X-offset of the mIRC TreeBar
Y The Y-offset of the mIRC TreeBar
W The width of the mIRC TreeBar.
H The height of the mIRC TreeBar.

XDock Signals
Signals are sent to mIRC containing information about components which have resized. To activate signal messages for docked windows, refer to /dcx xSignal
Signal:
DCX size WINDOW_TYPE HWND W H
Example:
DCX size mIRC_Toolbar 345564 1024 32
Parameters:
size The event signal identifier.
WINDOW_TYPE Information about which window type this information is describing.
mIRC The mIRC window has resized.
mIRC_Switchbar The mIRC SwitchBar has resized.
mIRC_Toolbar The mIRC ToolBar has resized.
mIRC_TreeList The mIRC TreeList has resized.
ListBox The channel ListBox has been resized.
Custom A custom window has been resized.
HWND The hwnd of the window which resized.
W The new width of the window.
H The new height of the window.
 
Note. For ListBox and Custom, the HWND will be the HWND of the window which triggered the event. For the other events, the HWND will be for the main mIRC window.
Contact � 2005-2009 Last Updated: 12th July, 09

Valid XHTML 1.0 Transitional Valid CSS!