| Home | Translations | Download | Forum | Bug Tracker

|  | v1.3.7

General Commands
These commands are general DCX commands and not oriented on any particular DCX controls.
$dcx(ColorDialog)
Opens up the color picker dialog and returns the selected color.
Syntax: | $dcx(ColorDialog, (DEFAULT) (STYLES))
Example: | $dcx(ColorDialog, $rgb(255,0,0) fullopen owner dcx anycolor)
Parameters:
DEFAULT | The color selected when the dialog opens.
STYLES | Various options for the color dialog.
anycolor | Displays all available colors in the set of basic colors.
fullopen | Displays the additional controls that allow the user to create custom colors.
nofullopen | Disables the Define Custom Color button.
solidonly | Display only solid colors in the set of basic colors.
owner | Allows you to specific the parent dialog/window. (Must also specify DNAME or HWND)
Note. By default, the main mIRC window is the parent. Dialog name OR a hWnd MUST follow after the owner style. Enter 0 for the hWnd to make it modeless. To get hWnd values, use $window().hwnd, $dialog().hwnd, $chan().hwnd, $chat().hwnd, $get().hwnd, $query().hwnd, $send().hwnd, and $timer().hwnd
$dcx(FontDialog)
Opens up the Font dialog and returns the selected font options.
Syntax: | $dcx(FontDialog, [(PARAM) (VALUE) [$chr(9) (PARAM2) (VALUE2) [$chr(9) (PARAM3) (VALUE3)]]])
Example: | $dcx(FontDialog, default +is ansi 9 Verdana $chr(9) color $rgb(255,0,0) $chr(9) owner dname $chr(9) flags +eh)
Parameters:
default | Allows you to specify the default font selected by the font dialog. Value must be in the following format: +flags charset size fontname
+flags | Font style flags. These affect the "default values" of the font selected when the FontDialog is first shown.
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, vietnamese.
size | Font size in points.
fontname | Font name.
flags | Allows you to specify flags to modify options for the actual font dialog.
a | Prevent the dialog box from displaying an initial selection for the font name combo box.
b | Allows selection of fonts for all non-OEM and Symbol character sets, as well as the ANSI character set.
c | Allow only the selection of scalable fonts. (Vector fonts, scalable printer fonts, TrueType fonts, and fonts scaled by other technologies.)
e | Display the controls that allow the user to specify strikeout, underline, and text color options.
f | Indicates an error condition if the user attempts to select a font or style that does not exist.
h | Disables the Script (charset) combo box.
i | Dialog should not allow graphics device interface (GDI) font simulations. (Not really sure what it does)
m | Limits font selections to a specific charset.
n | List only the fonts supported by the printer.
p | Select only fixed-pitch fonts.
r | List only horizontally oriented fonts.
s | List only the screen fonts supported by the system. (default)
t | Only list and allow the selection of TrueType fonts.
v | Will not allow vector font selections.
w | Allow only the selection of fonts available on both the printer and the display.
y | Prevent the dialog box from displaying an initial selection for the font style combo box. (Bold, italic, etc)
z | Prevent the dialog box from displaying an initial selection for the font size combo box.
color | Allows you to specify the default color (in RGB) to the font dialog.
rgb | Value of the color in $rgb()
minmaxsize | Allows you to specify the selectable font size range in the font dialog.
min | Minimum font value.
max | Maximum font value.
owner | Allows you to specific the parent dialog/window. (Must also specify DNAME or HWND)
DNAME|HWND | A dialog name or HWND for a window.
Return | The information returned is in the following format: RGB +FLAGS CHARSET SIZE FONTNAME
Note. Returns "" when cancelled. You do not have to specify all parameters, only the ones you wish to change. The parameter minmaxsize is limited to a range of 8-72. Any sizes other than that will be ignored. By default, the main mIRC window is the parent. Dialog name OR a hWnd MUST follow after the owner style. Enter 0 for the hWnd to make it modeless. To get hWnd values, use $window().hwnd, $dialog().hwnd, $chan().hwnd, $chat().hwnd, $get().hwnd, $query().hwnd, $send().hwnd, and $timer().hwnd
$dcx(GetSystemColor)
Returns the RGB value of a specific system color.
Syntax: | $dcx(GetSystemColor, [ATTRIBUTE])
Example: | $dcx(GetSystemColor, COLOR_WINDOW)
Parameters:
+ATTRIBUTE | The type of color. (From MSDN GetSysColor)
COLOR_3DDKSHADOW | Dark shadow for three-dimensional display elements.
COLOR_3DFACE | Face color for three-dimensional display elements and for dialog box backgrounds.
COLOR_3DHIGHLIGHT | Highlight color for three-dimensional display elements (for edges facing the light source)
COLOR_3DHILIGHT | Highlight color for three-dimensional display elements (for edges facing the light source)
COLOR_3DLIGHT | Light color for three-dimensional display elements (for edges facing the light source)
COLOR_3DSHADOW | Shadow color for three-dimensional display elements (for edges facing away from the light source)
COLOR_ACTIVEBORDER | Active window border.
COLOR_ACTIVECAPTION | Active window title bar. (Specifies the left side color in the color gradient of an active window's title bar if the gradient effect is enabled) (98+)
COLOR_APPWORKSPACE | Background color of multiple document interface (MDI) applications.
COLOR_BACKGROUND | Desktop.
COLOR_BTNFACE | Face color for three-dimensional display elements and for dialog box backgrounds.
COLOR_BTNHIGHLIGHT | Highlight color for three-dimensional display elements (for edges facing the light source)
COLOR_BTNSHADOW | Shadow color for three-dimensional display elements (for edges facing away from the light source)
COLOR_BTNTEXT | Text on push buttons.
COLOR_CAPTIONTEXT | Text in caption, size box, and scroll bar arrow box.
COLOR_DESKTOP | Desktop.
COLOR_GRADIENTACTIVECAPTION | Right side color in the color gradient of an active window's title bar. (98+)
COLOR_GRADIENTINACTIVECAPTION | Right side color in the color gradient of an inactive window's title bar. (98+)
COLOR_GRAYTEXT | Grayed (disabled) text. This color is set to 0 if the current display driver does not support a solid gray color.
COLOR_HIGHLIGHT | Item(s) selected in a control.
COLOR_HIGHLIGHTTEXT | Text of item(s) selected in a control.
COLOR_HOTLIGHT | Color for a hyperlink or hot-tracked item. (98+)
COLOR_INACTIVEBORDER | Inactive window border.
COLOR_INACTIVECAPTION | Inactive window caption. (Specifies the left side color in the color gradient of an inactive window's title bar if the gradient effect is enabled)
COLOR_INACTIVECAPTIONTEXT | Color of text in an inactive caption.
COLOR_INFOBK | Background color for tooltip controls.
COLOR_INFOTEXT | Text color for tooltip controls.
COLOR_MENU | Menu background.
COLOR_MENUHILIGHT | The color used to highlight menu items when the menu appears as a flat menu. The highlighted menu item is outlined with COLOR_HIGHLIGHT. (XP+)
COLOR_MENUBAR | The background color for the menu bar when menus appear as flat menus. However, COLOR_MENU continues to specify the background color of the menu popup. (XP+)
COLOR_MENUTEXT | Text in menus.
COLOR_SCROLLBAR | Scroll bar gray area.
COLOR_WINDOW | Window background.
COLOR_WINDOWFRAME | Window frame.
COLOR_WINDOWTEXT | Text in windows.
$dcx(GetTaskbarPos)
Retreives the position of the taskbar on your desktop.
Syntax: | $dcx(GetTaskbarPos)
Example: | $dcx(GetTaskbarPos)
Note. Returns X Y W H when successful. Returns 'D_ERROR: GetTaskbarPos' when unsuccessful.
$dcx(IsThemedXP)
Returns $true or $false depending on whether a visual style has been on the Windows system or not. (XP+)
Syntax: | $dcx(IsThemedXP)
Example: | $dcx(IsThemedXP)
$dcx(IsUnloadSafe)
This is used by /udcx to determine if /dll -u can be used or not.
Syntax: | $dcx(IsUnloadSafe)
Example: | $dcx(IsUnloadSafe)
$dcx(IsUsingDirectX)
Returns $true if the DLL includes DcxDirectShow. $false otherwise.
Syntax: | $dcx(IsUsingDirectX)
Example: | $dcx(IsUsingDirectX)
$dcx(IsUsingGDI)
Returns $true or $false depending on whether the GDI+ library is being used or not.
Syntax: | $dcx(IsUsingGDI)
Example: | $dcx(IsUsingGDI)
/dcx Mark
This command prepares the dialog for DCX-based commands.
Syntax: | /dcx Mark [NAME] [CALLBACK_ALIAS]
Example: | /dcx Mark dlgDCX cb_alias
Parameters:
NAME | Dialog window name.
CALLBACK_ALIAS | Callback Event alias name.
Note. This command must be called before every other command or else nothing will work.
$dcx(MsgBox)
Displays a messagebox which could be used to retrieve feedback from the user.
Syntax: | $dcx(MsgBox, [STYLES] $chr(9) [TITLE] $chr(9) [MESSAGE])
Example: | $dcx(MsgBox, yesnocancel warning defbutton3 $chr(9) Title Of The MessageBox $chr(9) Hello there)
Parameters:
STYLES | Various options for the messagebox.
ok | Displays a single OK button. This is the default.
okcancel | Displays two buttons, OK and CANCEL.
retrycancel | Displays two buttons, RETRY and CANCEL.
yesno | Displays two buttons, YES and NO.
yesnocancel | Displays three buttons, YES, NO and CANCEL.
exclamation | Shows an exclamation icon.
warning | Shows a warning icon.
information | Shows an information icon.
asterisk | Shows an asterisk icon.
question | Shows a question icon.
stop | Shows a stop icon.
error | Shows an error icon.
hand | Shows a hand icon.
defbutton2 | Makes the second button default upon display.
defbutton3 | Makes the third button default upon display.
defbutton4 | Makes the fourth button default upon display.
modal | The user must respond to the message box before continuing work with the owner dialog/window. However, the user can move other dialogs/windows.
sysmodal | Same as modal, but will take focus.
taskmodal | Same as modal, but this will halt mIRC and prevent access to any windows until the messagebox is cleared.
right | The text is right aligned.
rtl | Displays message and caption text using right-to-left reading order on Hebrew and Arabic systems.
foreground | The message box becomes the foreground window.
topmost | The message box is on top.
TITLE | The title of the messagebox.
MESSAGE | The message displayed in the messagebox.
Return | The return value can be one of the following: abort cancel continue ignore no ok retry tryagain yes
Note. While it is possible to use this command during events, avoid using MsgBox in events as it will block some scripts from executing. MsgBox can be used as an identifier or as a direct call. (eg. as $dcx(MsgBox) or /dcx MsgBox) By default, the main mIRC window is the parent. Dialog name OR a hWnd MUST follow after the owner style. Enter 0 for the hWnd to make it modeless. To get hWnd values, use $window().hwnd, $dialog().hwnd, $chan().hwnd, $chat().hwnd, $get().hwnd, $query().hwnd, $send().hwnd, and $timer().hwnd
$dcx(OpenDialog/SaveDialog)
Opens up the Open/Save file dialog and returns the selected file.
Syntax: | $dcx(OpenDialog/SaveDialog, (STYLES) $chr(9) (FILENAME) $chr(9) (FILTER))
Example: | $dcx(OpenDialog/SaveDialog, showhidden filemustexist hidereadonly $chr(9) c:\boot.ini $chr(9) All Files (*.*)|*.*) $dcx(OpenDialog/SaveDialog, createprompt overwriteprompt owner dcx $chr(9) c:\blah.txt $chr(9) All Files (*.*)|*.*|Music Files|*.mp3;*.wav;*.ogg)
Parameters:
STYLES | Various options for the Open/Save file dialog.
createprompt | If the user enters a filename that does not exist, the dialog asks the user if they want to create it. Returns the filename (without creating it) if they click yes. (OpenDialog only)
enablesizing | The dialog is resizable.
filemustexist | If the file doesn't exist in the current directory, the user will get an error prompt. (OpenDialog only)
showhidden | Forces the showing of system and hidden files, overriding the user setting to show or not show hidden files. A file that is marked both system and hidden is not shown. (XP+)
noreadonly | Hides the "Open as Read Only" checkbox.
nochangedir | Restores the current directory to its original value if the user changed the directory while searching for files. (SaveDialog only)
multisel | Allows user to select multiple files. (OpenDialog only)
getshortcuts | Allows dialog box to return the path and file name of the selected shortcut (.LNK files)
nonetwork | Hides the network button.
norecent | Does not add a link to the selected file in the file system directory that contains the user's most recently used documents.
novalidate | The dialog does not validate filenames to check if they're legal.
overwriteprompt | If the user selects a file that already exists, the dialog asks the user if they want to overwrite it. Returns the filename (without clearing) if they click yes. (SaveDialog only)
pathmustexist | The dialog does not validate filenames to check if they're legal.
owner | Allows you to specific the parent dialog/window. (Must also specify DNAME or HWND)
FILENAME | If you specify this parameter, it will be the filename in the box when the dialog opens.
FILTER | The FILTER parameter is the type of files the user can select, it should be formatted like "Description|Type|Description|Type"
Note. Returns "" when cancelled. filemustexist automatically applies pathmustexist when style used. multisel returns files in this format [PATH]|[FILE1]|[FILE2]|..., where the first token will be the path, and the files are seperated by the | (pipe) character. By default, the main mIRC window is the parent. Dialog name OR a hWnd MUST follow after the owner style. Enter 0 for the hWnd to make it modeless. To get hWnd values, use $window().hwnd, $dialog().hwnd, $chan().hwnd, $chat().hwnd, $get().hwnd, $query().hwnd, $send().hwnd, and $timer().hwnd
$dcx(Version)
Returns information on the DLL Version.
Syntax: | $dcx(Version)
Example: | $dcx(Version)
/dcx WindowProps
This command allows you to set the window title text, icon, and remove themes.
Syntax: | /dcx WindowProps [HWND] [+FLAGS] [ARGS]
Example: | /dcx WindowProps $dialog(dcx).hwnd +t Hello /dcx WindowProps $dialog(dcx).hwnd +i 3 mirc.exe /dcx WindowProps $dialog(dcx).hwnd +T
Parameters:
HWND | The HWND of the window.
+FLAGS | Options to apply to the window.
t | Set the title text.
i | Set the window icon.
g | Set the window icon in grayscale.
T | Remove any themes on the window.
Variable parameters ARGS:
t | (TEXT)
TEXT | The window title text
i | [INDEX] [FILENAME]
INDEX | Icon index in icon archive
FILENAME | Icon archive filename
Note. Use 0 for INDEX if the file is a single icon file.
/dcx xSignal
This command enables or disables signals whenever a window (or docked window) is resized.
Syntax: | /dcx xSignal [BOOL]
Example: | /dcx xSignal 1
Parameters:
BOOL | Either 0 or 1, stating on or off.
Note. This must be enabled in order to receive sizing events upon non-DCX windows resizing (used with /xdock, where you cannot /dcx Mark @windows or #channels). Regular /dcx Mark'd dialogs will still receive events in the callback aliases. A signal will only be sent for a window being resized if it is the main mIRC window, docked, or contains a docked window. Refer to XDock Signals documentation for more information.
| General Commands ColorDialog FontDialog GetSystemColor GetTaskbarPos IsThemedXP IsUnloadSafe IsUsingDirectX IsUsingGDI Mark MsgBox OpenDialog/SaveDialog Version WindowProps xSignal

Contact | © 2005-2006 | Last Updated: 14th January, 07