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