mIRC Homepage
Posted By: greeny switchbar width - 26/01/06 03:15 AM
i wondered if theres an easy way for a dll to change the width of the switchbar to something bigger than 99 pixels?
Posted By: NaquadaServ Re: switchbar width - 16/02/06 12:11 AM
Easy not really, unless you know what you are doing, and since you are asking... wink

Subclass the toolbar window handle using SetWindowLong(hwnd, GWL_WNDPROC, ..). In the subclassed procedure, create a switch to handle window messages, always passing the messages to the previous windows procedure after processing them first.

You will need to intercept and stop mIRC from receive messages such as WM_SIZE and WM_MOVE. Since mIRC isn't getting these messages anymore, you will need to (re)size the window in your subclassed procedure (look at SetRect() and GetWindowRect())

You could also wait until I have time to finish my DLL that will do this and much more (like completely DLL based treeview switchbar)... wink
Posted By: NaquadaServ Re: switchbar width - 17/02/06 01:26 AM
Oh yeah, you'll also need to resize and move the MDIClient window, so that width of the switchbar plus MDIClient equals the mIRC window width.
Posted By: NaquadaServ Re: switchbar width - 18/02/06 06:31 AM
I now have a working beta version available for download here.

To use: /dll mIRC.dll SwitchbarSize 150
(the "150" the size, set to whatever is reasonable...)
Posted By: Mentality Re: switchbar width - 18/02/06 07:05 AM
Assuming I understand the request, in mIRC 6.17 you can now increase the switchbar width up to 250.

Regards,
Posted By: NaquadaServ Re: switchbar width - 19/02/06 06:09 PM
Awesome, though I don't recall seeing in the log of changes in 6.17. smile

Still needs the treeview switchbar... wink
Posted By: Mentality Re: switchbar width - 19/02/06 09:59 PM
It doesn't mention the specific width change, but it does say

"162.Switchbar now allows wider buttons when placed on left/right."

Glad you like it smile

Regards,
© mIRC Discussion Forums