mIRC Home    About    Download    Register    News    Help

Print Thread
#140479 26/01/06 03:15 AM
Joined: Dec 2002
Posts: 230
G
greeny Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Dec 2002
Posts: 230
i wondered if theres an easy way for a dll to change the width of the switchbar to something bigger than 99 pixels?

#140480 16/02/06 12:11 AM
Joined: Dec 2002
Posts: 580
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
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


NaquadaBomb
www.mirc-dll.com
#140481 17/02/06 01:26 AM
Joined: Dec 2002
Posts: 580
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
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.


NaquadaBomb
www.mirc-dll.com
#140482 18/02/06 06:31 AM
Joined: Dec 2002
Posts: 580
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
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...)


NaquadaBomb
www.mirc-dll.com
#140483 18/02/06 07:05 AM
Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
Assuming I understand the request, in mIRC 6.17 you can now increase the switchbar width up to 250.

Regards,


Mentality/Chris
#140484 19/02/06 06:09 PM
Joined: Dec 2002
Posts: 580
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
Awesome, though I don't recall seeing in the log of changes in 6.17. smile

Still needs the treeview switchbar... wink


NaquadaBomb
www.mirc-dll.com
#140485 19/02/06 09:59 PM
Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
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,


Mentality/Chris

Link Copied to Clipboard