mIRC Customizer (mircustom) is a DLL that lets you change the appearance of windows in mIRC. At the moment, it lets you change the icon, the titlebar text and the cursor of them.
To call the functions, you can use two syntaxes:
/dll <mircustom> <function> [parameters] $dll(<mircustom>, <function>, <parameters>)
mircustom is the path to the DLL, function is the name of the function and parameters are the required parameters. Note that, even if a command doesn't require any parameter, the secone one must have something. In these cases, you can use anything as a parameter (like a dot), that the DLL will ignore it.
If you use $dll(), you'll have a return value. This return value often will be S_OK, if no errors ocurred, or E_<error> <error message>, where <error> is a one-word identifier for the error and <error message> is a detailed message, if something wrong happened.
Syntax: SetIcon -amw [hWnd] [index] <filename>
Returns: S_OK, E_<error> <error description>
SetIcon changes the icon of a window.
To change the icon of the active window, use -a; to change the icon of the main mIRC window, use -m; to change the icon of any other window, use -w, and specify the hWnd parameter. You can use $window().hwnd (or $dialog().hwnd, if you want to change the icon of a dialog) to get this parameter.
If a file has more than one icon resource (for example, if it is a .dll, a .exe or a .icl file), you can specify an index number, starting from 1. If you don't specify the index number, it will default to 1.
; This example changes mIRC's icon to the old one (the 3rd icon in ; mirc32.exe) //dll mircustom.dll SetIcon -m 3 $mircexe ; This example changes the icon of the first dialog open to a closed ; folder icon (the 4th in the Windows Shell DLL, shell32.dll) //dll mircustom.dll SetIcon -w $dialog(1).hwnd 4 shell32.dll ; Changes the icon of the Status Window to the default dialog icon (the ; 2nd in mirc32.exe) //dll mircustom.dll SetIcon -w $window(Status Window).hwnd 2 $mircexe
Syntax: Titlebar -amw [hWnd] <text>
Returns: S_OK, E_<error> <error description>
Titlebar changes the title of a window.
The -amw switches and the hWnd parameter are the same from SetIcon.
The main purpose of this function is to let you change the titlebar text of @windows without having to prefix it with the window name. You can change the titlebar of a dialog by specifying its hWnd, but it doesn't make much sense since you can use /dialog -t.
Please note, that, although you can change mIRC's title with this function (and make it not have that "mIRC" prefix), it's not recommended to do so. As mIRC stores internally the titlebar which is set using /titlebar, whenever it needs to reset the titlebar (like after a highlight), the last text that was set with /titlebar will be back. If you use this function on the main mIRC window, $titlebar will also return the last content set using /titlebar.
If you use this command on a @window, $window().title will return the titlebar, but starting from the 2nd word (as it will assume the first should be the name of the @window). If you use it on a dialog, $dialog().title will work correctly.
; This example changes active window's titlebar to the current date: //dll mircustom.dll Titlebar -a $fulldate ; This example changes the titlebar of @mywin to "The book is on the table": //dll mircustom.dll Titlebar -w $window(@mywin).hwnd The book is on the table ; Note: if you use $window(@dog).title, it will return "book is on the table"
Syntax: SetCursor -amw [hWnd] <cursor>
Returns: S_OK, E_<error> <error description>
SetCursor changes the cursor shape for a window. <cursor> can be one of these:
default appstarting cross hand help ibeam no size sizenesw sizens sizenwse sizewe uparrow wait
The -amw switches and the hWnd parameter are the same from SetIcon.
Note that this function actually changes the cursor for a whole window class – if you change, for example, the cursor for a custom window, all the other custom windows will have their cursor changed to the one you specified. So, you should use this function with care and reset the cursor to "default" when the mouse leaves the window.
; This example changes the cursor to a cross when you drag the left ; mouse button over a picture window named @pwin menu @pwin { ; set the cursor on click sclick:dll mircustom.dll SetCursor -a cross ; reset the cursor when the mouse button is left uclick:dll mircustom.dll SetCursor -a default ; also reset when the cursor leaves the window leave:dll mircustom.dll SetCursor -a default }
Syntax: DLLInfo
Returns: S_OK <DLL info>
DLLInfo just returns some information about the DLL.
//echo -a $dll(mircustom.dll, DLLInfo, .) ; Since mIRC requires a parameter in $dll(), you can put anything on ; it. The DLL will just ignore it.