DCX - Dialog Control Xtension
v1.4.0
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.
hgradient Draws a horizontal gradient with the colors specified.
tooltips The image will have a tooltip.
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.
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 -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().fname
This property returns loaded filename (if any).
Syntax:
$xdid(dialog, ID).fname
Example:
$xdid(dcx, 4).fname

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-2007 Last Updated: 25th December, 07

Valid XHTML 1.0 Transitional Valid CSS!