DCX - Dialog Control Xtension Home | Translations | Download | Forum | Bug Tracker
v1.3.7
DCX
This DLL lets you add new controls to mIRC dialogs as well as change other features like the visual style, position etc...
DCX does not support mIRC controls (NOT EVEN mIRC TABS), nor anything related to mIRC normal dialogs except it's menus. DCX does not work like MDX so please read the manual and see dcx.mrc and dcx_tools.mrc for examples.
XPopup (special mIRC menus) need to be patched to work on mIRC v6.2! Custom menus still work normally.
The DLL creates the controls directly on the mIRC dialog and you use clone functions defined by /xdid and $xdid which behave like the regular /did and $did to interact with the controls.

The event handling in the DLL is supported by a callback alias supplied by the user when the dialog is marked before adding DCX controls. The callback alias is called from within the DLL to ask for info (if you want to modify the default behavior in the DLL thus the "callback" type) and will supply the user with the events and parameters of these events.

Every function in this DLL returns a value if used with the $dll identifier. D_OK [function]: [message] if successful, D_ERROR [function]: [message] otherwise.

Note: Mandatory parameters are expressed in [SQUARE] brackets and optional parameters in (ROUNDED) brackets.
Note: We strongly suggest you load the dcx_tools.mrc file included in the zip as it contains the necessary /xdialog and /xdid aliases and identifiers needed to use the DLL.
Note: Function calls, styles, and references to anything DCX related are all case sensitive!
GDI+
For advanced support for images (such as extra file formats and drawing routines), Microsoft has released a library called GDI+. This is included in Windows XP, however older versions of Windows may not have this.

Use $dcx(IsUsingGDI) to check whether or not you have GDI+ support on your computer. If you do not, you can download it here.

Latest Changes
If you notice any inconsistancies or errors with the documentation, please put a post on the forum on this thread!

v1.3.7
  • New features
    1. added $xpopup().isPatched
    2. added /xdialog -z, $xdialog().zlayer and $xdialog().zlayercurrent. Useful for creating tab-like pages for configuration dialogs and wizard type screens
    3. added $dcx(IsUnloadSafe)
    4. added new +x flag to /xdialog -b to enable composite rendering on XP+
    5. added $xdid(listview).columns
    6. added /xdid -i +s flag to set selection color for treeview
    7. added $dcx(IsUsingGDI)
    8. added $dcx(IsUsingDirectX)
    9. added alpha style for many controls
    10. added DirectShow
    11. added Stackerv
    12. added DateTimePicker
    13. added wordwrap support to transparent on text control
    14. added DCXML (still experimental)
    15. added $xdid(dname,id).alpha to tell if a control has the alpha style or not.
    16. added $xdock(mIRC).toolBarPos
    17. added $xdock(mIRC).treeBarPos
    18. added /xdialog -R dname +s which adds a shadow effect to the dialog
    19. added XTray
    20. added /xpopup -m mirc to patch mIRC allowing xpopup to work on mIRC 6.20
    21. added /xdock -F to set the treebar font, colors and styles
    22. added shadow style for many controls
    23. added support for combining regions via flags using /xdid -R and /xdialog -R
    24. added transparent global style
    25. added ghost drag for main mirc window via /xdock -G
    26. added ghost drag /xdialog -R dname +g
    27. added $xdid().range and .value to calendar
    28. modified $xdid(list).sel to include optional parameter N
    29. modified $xdid(listview).sel to include a new optional parameter N
    30. LoadDLL() now displays information related to dcx upon loadup if /debug is used in mIRC
  • Fixes and changes
    1. *** IMPORTANT *** image - changed /xdid -i to include flags
    2. *** IMPORTANT *** treeview - changed /xdid -a to include parameter for background color
    3. *** IMPORTANT *** calendar - changed calendar $xdid().selected to .value
    4. dialog - added max tooltip width of 400, this enables multiline tooltips by using $crlf in text.
    5. list - fixed memleak in $xdid().sel when n is not > 0
    6. progressbar - fixed a bug where some vars werent cleared on object creation.
    7. richedit - fixed memleak in $xdid().seltext
    8. image - fixed resizing bug
    9. added a check for invalid filename when loading icons
    10. list - changed $xdid().sel to limit the results length to 900
    11. listview - changed $xdid().sel to limit the results length to 900
    12. webcontrol - added error message to xdid -j when control isnt in ready state
    13. made WS_CLIPCHILDREN style apply to all controls
    14. webcontrol - changed it to be WS_CLIPSIBLINGS should help with some rendering issues
    15. xdock - changed DockWindow() to make parent window WS_CLIPCHILDREN and WS_CLIPSIBLINGS. this should help with rendering glitches
    16. changed gdiplus.dll to be a late loading dll to allow us to try & loading it without the dcx.dll failing to load completely. (this needs to be added to vs2003 project file)
    17. listview - fixed xdid -j bug where lviDcx wasnt checked for NULL
    18. listview - changed xdid -a to always add an lviDcx
    19. listview - removed duplicate code in xdid -a
    20. image - added setting the smoothing mode for gdi+ to aliased
    21. added error message to xdialog -R when a region couldnt be created
    22. Improved background rendering abit
    23. tab - added quick fix for tab closing when escape is pressed
    24. toolbar - fixed imagelist bug which caused display corruption
    25. tab - sclick now works for active item, and rclick work for inactive tabsv
    26. box - changed the drawing code abit to show the parents background abit better outside the box bounds
    27. fixed bug where tab control wasnt passing on child controls result codes
    28. richedit - fixed mem leak in $xdid().text
    29. $xdid().num on RichEdit now returns the real ammount of lines instead of always returning 1
    30. button - fixed BS_DEFPUSHBUTTON style not working
    31. listview - fixed rendering problem where item wouldnt be updated after being selected if a background picture was set
    32. listview - fixed /xdid -r bug that crashed mIRC
    33. toolbar - added error message for invalid flags symbol to xdid -w
    34. list - fixed mwheel support
    35. listview - fixed bug where you couldnt use /xdid -v on a listview item with a progressbar without it thinking it was a progressbar command, even if it was for a different subitem
    36. calander/datetime - fixed a bug where a TString object was used directly in an wsprintf instead of doing to_chr()
    37. readded quickfix for richedit excessive selchange
    38. changed calendar $xdid().selected to return 2 values even if not MULTI select
    39. changed Image to have auto image resize TRUE by default (this would break less scripts)
    40. renamed $xdock() functins to start with lower case (it was inconsistant with other property functions)
  • Dcx code
    1. changed dcxSetWindowTheme() to actually pass on the args to the theme dll
    2. set load->mKeep to TRUE
    3. changed some function args to be const
    4. dialog - changed tooltip hwnd check to use IsWindow() instead of != NULL
    5. dialog - added safeToCloseAll() function to dialogcollection.
    6. dialog - changed getName(), getAliasName() and getParentName() to return const refrences to the TString objects instead of new objects.
    7. dialog - small change to getDialogByName() to cast the TString object for compare.
    8. changed $xdid().pos & $xdid().dpos & $xdid().mouse to use MapWindowPoints() instead of ScreenToClient()
    9. dialog - rewrote DrawParentsBackground() to avoid creating an HDC unless it needs to, left commented old code in for refrence as this routine will need changed when/if we start giving ctrls bitmap backgrounds.
    10. dialog - changed $xdialog().mouse to use MapWindowPoints()
    11. dialog - changed DrawDialogBackground() to use client areas offsets instead of just zero.
    12. dialog - improved MakeShadow() by pre-calculating one of the PreMultiply() numbers instead of doing it within 2 loops.
    13. listview - changed $xdid().columns to use lstrcpyn() instead of wsprintf() when result is zero
    14. progressbar - changed WM_ERASEBKGND to render parents bkg when transparent
    15. image - changed /xdid -w to use MapWindowPoints()
    16. text - changed /xdid -w to use MapWindowPoints()
    17. added an extra error report to ChangeHwndIcon()
    18. changed ret() define to limit the copy to 900
    19. added an IsFile() check to dcxLoadBitmap()
    20. changed some parseGlobalInfoRequest() results to avoid buffer overflows
    21. changed defines.h to enable GDIPlus v1.1 specific stuff
    22. richedit - moved some vars in constructor
    23. statusbar - small change to $xdid().parts loop
    24. added IsFile() function to see if a file can be accessed or not
    25. added GetLastStatusStr() function to get string that go with GDIPlus error responses
    26. changed LoadDll() to place dll into non-gdi+ mode if GdiplusStartup() fails
    27. webcontrol - changed to use TString.to_wchr() where applicable
    28. listview - changed the constructor to insure that this control isnt WS_CLIPCHILDREN
    29. removed commented includes and constructors in most controls
    30. added new build called Development. This build is for dev releases & is the same as Release build except that it defines DCX_DEV_BUILD
    31. added a check for the avalibility of gdiplus.dll that sets a flag when the dll cant be loaded & displays a warning
    32. changed debug messages that rely on /debug on in mIRC to use a define DCX_DEBUG which can be easily switched to output nothing for the release builds
    33. tstring - added to_float() function to return the string as a double floating point number
    34. added DCXDebug(Cmd, Msg), similar to DCXError(Cmd, Msg)
    35. added DCX_USE_GDIPLUS define to control linking with gdiplus.lib (affects image & stacker controls)
    36. changed controlFactory() ctrl mask to be 64bit
    37. disabled the #4995 warning (name was marked as #pragma depricated)
    38. xdock - changed the rest of $xdock() to use a switch()
    39. changed SwitchbarPos() so it can be reused for the diff windows
    40. improved the prop handling a bit
    41. added dcxDrawShadowText() function & changed controls that support the shadow style to use it
    42. changed SetLayeredWindowAttributes to be an optional function pointer which is only used if its avail
    43. added WM_COMPAREITEM forwarding
    44. changed DrawParentsBackground() to use themes when it can, & to recurse when the parent its transparent
    45. added AggressiveOptimize.h to project
    46. changed mapfile code to detect mIRC 6.20 or 6.21+
    47. box - changed EnumBoxChildren() to only disable controls that are direct children of the box, not grandchildren
    48. tstring - changed to use CopyMemory()
    49. pager - removed WM_COLORDLG handling
    50. tstring - added to_wchr()
    51. change `sclick` & `rclick` callback events to be sent on mouseup
    52. box - commented BN_CLICKED message out
    53. text - fixed mem leak in wm_paint when transparent
    54. text - fixed styles when transparent, was hardcoded to be left
    55. tab - moved var to outside while loop in xdid -r code
    56. added DrawCtrlBackground() which handles drawing of a controls background
    57. changed DrawDialogBackgroundBitmap() to DrawDialogBackground(), now also handles background brush
    58. listview - added LVN_DELETEALLITEMS handling to listview to insure we always get an LVN_DELETEITEM message
    59. added getBgBitmap(), getBgTransparentCol(), & DrawDialogBackgroundBitmap() functions to dialog class
    60. changed /xdialog -g to call redrawWindow() instead of InvalidateRect()
    61. added getParentCtrl() & updateParentCtrl() functions to DcxControl class
    62. added AggressiveOptimize.h & some misc changes to compiler setting for VS2005 for a smaller dll size
    63. changed most controls to use dcxLoadIcon instead of ExtractIconEx()
    64. updated SystemTimeToMircTime() to include time
    65. listviews/treeview - changed regex search to handle commas in the text or regex pattern
    66. moved MircTimeToSystemTime() and SystemTimeToMircTime() to misc.cpp
    67. fixed typo in dcxdatetime.h checking wrong #IFNDEF
    68. changed alot of TString object = string; to TString object(string);
    69. changed treeviews getPathFromVector() to be a static function
    70. added checks to /xdock docking commands for window already being docked elsewhere
    71. added a check for invalid SYSTEMTIME values for SystemTimeToMircTime()
    72. fixed bug with List tbitem where it returns too many items
  • Dcx Documentation
    1. fixed dcxdoc quirk with dialog events given the ID 4
    2. removed a fixed string comparison for SECTION_INTRO
    3. added note for gdi+ loading multiple formats for image
    4. added note for gdi+ on index for where to download it
    5. added example to /xdid -R
    6. moved xpopup events upwards
    7. reworded and fixed example for /mpopup
    8. updated Dcx vs Mdx
    9. removed anchor from subcategory for changes.htm
    10. removed note for /xdid -i for image about only loading BMP files
    11. added CShadowHwnd to credits
    12. new logo
    13. altered documentation style sheet
    14. altered some quirks in dcx_inc.php
    15. fixed general typos and copy/paste errors found in the forums
    16. reworded recommendation in calendar and datetime intro
    17. added a little drawing bug notice to calendar intro
    18. removed link to dcx_old docs
    19. fixed up intro for calendar
    20. added note for calendar /xdid -m
    21. lower-cased first letter of all $xdock() functions
Callback Alias Events
Overview
Every DCX Control fires events upon user action on the control. These events are sent to an alias specified when the dialog is Marked.

Why are the events not sent like regular on *:DIALOG: events?
Well for one thing, mIRC events are linear and static in the way that you cannot return any value to the event manager, to modify the default behavior of the event. Using callback support with an alias enables this type of interaction.

Callback Event Data
Format: [NAME] [EVENT] [ID] [VALUE]
Parameters:
NAME $1 = Name of the dialog that the event came from.
EVENT $2 = Name of the event (eg. sclick, dclick, ...)
ID $3 = ID of the control that fired the event.
VALUE $4 = Additional information, event specific (usually $null, except specified otherwise in documentation)
 
Note.
Some control events support return values to change their default behaviour. When returning special values during certain events, such as nosize for sizing, interact with the DLL and modify the default event behavior. The events that support a return value will have a description of what the return value does when returned.
Credits
Lead Developer ClickHeRe
Supporting Developers
(in chronological order)
hixxy
twig*
Mpdreamz
HAPM
Ook
 
Documentation twig*
Andy
Mpdreamz
 
Additional libraries  
CWndShadowx Copyright (c) 2006 Perry Zhu Treebar.dll NaquadaServ
 
MDX vs DCX Mpdreamz
Demo Script elizio
General Testing
(and forum helpers!)
dJabba
PYERO
dunkelzahn
TheShadowOne
zipster
bl0x
darkrift
The_Mega_ZZTer
Duplex
evasion
 
Tutorials j0x's DCX Tutorials (French)
DCX Forum: Help: CLA
DCX Forum: CLA :(
Mpdreamz's Cell Layout Algorithm Tutorial
EinsteinXXL's CLA Tutorial (German)
 
Translations
Dutch Mpdreamz
Finnish Mkz
French dunkelzahn
German Duplex
Hebrew seec77
Italian Still need someone!
Malaysian da^hype
Portuguese (Brazil) Henrique
Portuguese (Portugal) Theorem
Spanish PaTaGoN
Swedish Rixxon
 
Website http://dcx.scriptsdb.org
Forums
 
Support #scriptsdb.org @ Undernet
#genscripts @ AmeriChat
Contact © 2005-2006 Last Updated: 14th January, 07

Valid XHTML 1.0 Transitional Valid CSS!