DCX - Dialog Control Xtension
 
Image
Image control that lets you display BMP, GIF, JPEG, Exif, PNG, TIFF, ICON, WMF and EMF images. However, if GDI+ is not loaded, DCX can only support native BMP format files. See $dcx(IsUsingGDI).

Control Styles
These control styles are available when creating a Image 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.
hcenter Draws the image centered horizontally in the control. (only affects images loaded with +k)
hgradient Draws a horizontal gradient with the colors specified.
tooltips The image will have a tooltip.
vcenter Draws the image centered vertically in the control. (only affects images loaded with +k)
vgradient Draws a vertical gradient with the colors specified.

/xdid flags
Control commands are input to the control with the /xdid command.
/xdid -i
This command lets you set the displayed image.
Syntax:
/xdid -i [DNAME] [ID] [+FLAGS] [FILENAME]
Example:
/xdid -i dcx 4 + $mircdir/image/test.bmp
Parameters:
+FLAGS Load image flags.
a Anti-aliased mode.
b Enable support for PNG per-pixel-alpha channels.
h High quality mode (Slower).
t Tiled image.
A No animation even if the format supports it.
k Keep images aspect ratio.
FILENAME Image filename.
 
Note.
  • The control stretches the image to fit its width/height.
  • Image transparency is supported by supplying the transparent color.

/xdid -k
This command lets you set the image transparent color.
Syntax:
/xdid -k [DNAME] [ID] [COLOR]
Example:
/xdid -k dcx 4 $rgb(255,0,255)
 
Note. When using a transparent color, you may need to set the background color of the control like $rgb(face) for the dialog background color.

/xdid -o
This command lets you offset an image in the control.
Syntax:
/xdid -o [DNAME] [ID] [XOFFSET] [YOFFSET]
Example:
/xdid -o dcx 4 20 20
Parameters:
XOFFSET The horizontal offset for the image.
YOFFSET The vertical offset for the image.
 
Note. Negative offsets are valid.

/xdid -w
This command lets you set an icon for the image.
Syntax:
/xdid -w [DNAME] [ID] [+FLAGS] [INDEX] [SIZE] [ICON]
Example:
/xdid -w dcx 4 +g 2 48 shell32.dll
Parameters:
+FLAGS Icon flags
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.
SIZE Size of the icon.
FILENAME Icon archive filename.
 
Note.
  • Use 0 for INDEX if the file is a single icon file.
  • When the icon is loaded, the Image control is resized to SIZE for width and height.

/xdid -F
This command lets you enable or disable automatic resizing of the image.
Syntax:
/xdid -F [DNAME] [ID] [+FLAG] [ARGS]
Example:
/xdid -F dcx 4 +a 1
Parameters:
+FLAGS Animation flags.
a Start/Pause an animation.
[ARGS] is [1|0].
d Set the delay between frames.
[ARGS] is [DELAY].
A delay of zero causes the images built in delay to be used.
f Set the current frame.
[ARGS] is [FRAME].
[FRAME] must be >=0 & <= $xdid(dname,id).frames
ARGS This is dependent on which flag is used.
 
Note. .

/xdid -S
This command lets you enable or disable automatic resizing of the image.
Syntax:
/xdid -S [DNAME] [ID] [1|0]
Example:
/xdid -S dcx 4 1
 
Note. Automatic resizing is enabled by default.

$xdid() Properties
The $xdid identifier is a given mIRC alias that communicates with the DCX DLL to extract information in DCX controls.
$xdid().delay
This property returns the frame delay for the specified frame.
Syntax:
$xdid(dialog, ID, [N]).delay
Example:
$xdid(dcx, 4, 2).delay
 
Note. If N is zero returns the delay for the current frame.

$xdid().fname
This property returns loaded filename (if any).
Syntax:
$xdid(dialog, ID).fname
Example:
$xdid(dcx, 4).fname

$xdid().frames
This property returns the number of frames in an animation (if any).
Syntax:
$xdid(dialog, ID).frames
Example:
$xdid(dcx, 4).frames

$xdid().isanimated
This property returns if a loaded image is an animation.
Syntax:
$xdid(dialog, ID).isanimated
Example:
$xdid(dcx, 4).isanimated

Image Events
These events are fired when activity occurs in the Image control.
dclick
When the image is double-clicked.
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

lbup
When you release the left mouse button.
Syntax:
/cb_alias DNAME lbup ID
Example:
/cb_alias dcx lbup 4

rclick
When you right-click on the image.
Syntax:
/cb_alias DNAME rclick ID
Example:
/cb_alias dcx rclick 4

sclick
When the image is clicked.
Syntax:
/cb_alias DNAME sclick ID
Example:
/cb_alias dcx sclick 4

Contact © 2005-2022 Last Updated: 19th November, 22

Valid XHTML 1.0 Transitional Valid CSS!