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 and the titlebar text 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 $true, if no errors ocurred, or $false <error message>, if something wrong happened.
Syntax: SetIcon -amw [hWnd] [index] <filename>
Returns: $true, $false <error>
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 active window to the "mIRC dll!" ; icon (an icon contained in this dll) /dll mircustom.dll SetIcon -a mircustom.dll ; 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: $true, $false <error>
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.
If you use this function on the main mIRC window, $titlebar will still return the last content set using /titlebar. If you use it 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 @dog to "I am weasel": //dll mircustom.dll Titlebar -w $window(@dog).hwnd I am weasel ; Note: if you use $window(@dog).title, it will return "am weasel"
Syntax: CountIcons <filename>
Returns: $true <number of icons>, $false <error>
CountIcons is a misc function that counts the number of icons on a file.
Remember that you have to take out the "$true" of the return value.
; This example shows how many icons mirc32.exe has (18 on mIRC 5.9): //echo $dll(mircustom.dll, CountIcons, $mircexe) ; This example returns how many icons the Windows Shell DLL file has: //echo $dll(mircustom.dll, CountIcons, shell32.dll) ; Depending on your Windows and Internet Explorer versions, this file ; may have over 100 icons.
Syntax: DLLInfo
Returns: $true <DLL info>
DLLInfo just returns some information about the DLL.
//echo $dll(mircustom.dll, DLLInfo, .) ; Since mIRC requires a parameter in $dll(), you can put anything on ; it. The DLL will just ignore it.