Hooking the Messenger Main Window |
Author: |
Message: |
RaceProUK
Elite Member
Posts: 6073 Reputation: 57
39 / /
Joined: Oct 2003
|
O.P. Hooking the Messenger Main Window
I've tried the obvious (Windows CBT hook), but even the HCBT_ACTIVATE doesn't seem to be triggered when the contact list is shown. I know a CBT hook would work if I had an EXE running before Messenger, but I'm writing a plugin, so all windows have already been created.
I know TazDevil is at least able to manipulate the contact list window, so I was wondering how it's done? And if anyone else has any info as well.
Ultimately, I want to add a menu to the contact list window.
|
|
08-20-2005 11:13 AM |
|
|
Stigmata
Veteran Member
Posts: 3520 Reputation: 45
21 / /
Joined: Jul 2003
|
RE: Hooking the Messenger Main Window
Ive done this before, and plus is what is stopping you..
Plus changes something.. cant remember what..
Kill msgplus.exe and it should work fine
|
|
08-20-2005 11:40 AM |
|
|
absorbation
Elite Member
Posts: 3636 Reputation: 81
– / /
Joined: Feb 2005
|
RE: Hooking the Messenger Main Window
does'nt mdx now add the menu? well e-mail patchou would be the best way
|
|
08-20-2005 11:42 AM |
|
|
Dempsey
Scripting Contest Winner
http://AdamDempsey.net
Posts: 2395 Reputation: 53
38 / /
Joined: Jul 2003
|
RE: Hooking the Messenger Main Window
TazDevil monitors windows created by the msnmsgr.exe process and then compares each window to the main window hwnd returned from the messenger api and if theres a match, its the main window so then you can do what you want with it.
|
|
08-20-2005 12:02 PM |
|
|
RaceProUK
Elite Member
Posts: 6073 Reputation: 57
39 / /
Joined: Oct 2003
|
O.P. RE: Hooking the Messenger Main Window
So I guess TazDevil uses some form of API hooking?
|
|
08-20-2005 12:32 PM |
|
|
Dempsey
Scripting Contest Winner
http://AdamDempsey.net
Posts: 2395 Reputation: 53
38 / /
Joined: Jul 2003
|
RE: Hooking the Messenger Main Window
i assume so yes i'm not actually sure. try pming him cos he's no online atm
|
|
08-20-2005 12:34 PM |
|
|
RaceProUK
Elite Member
Posts: 6073 Reputation: 57
39 / /
Joined: Oct 2003
|
O.P. RE: Hooking the Messenger Main Window
Strange no-one else has posted anything yet.
|
|
08-24-2005 02:32 PM |
|
|
TazDevil
Full Member
sleep(0);
Posts: 359 Reputation: 11
41 / /
Joined: May 2004
|
RE: Hooking the Messenger Main Window
Hi Dempsey just pm'ed me about this issue...
First of all i tryed the CBT hook as well and had the same problem with raceprouk with HCBT_CREATED... because the plugin was loaded after the conctact list was created, so it was useless...
Then i used the HCBT_ACTIVATE hook whick worked ok, but still there is a catch here as you subclass the window before Plus! does and there i had a problem with transparency (cause i am removing the menu)... so there is no good as well
From my reaserch after trying to resolve the transparency issue i had to subclass the window after Plus does, so i had to make sure that at least the plus menu is loaded in the contactlist window...
I have also tryed other hook types such as WH_WNDPROC etc but still that was no good, so i decided to work with api hooking
So the latest place that i have come upto right now that doesnot give me a problem with the transparency is hooking the InsertMenuItem() API called by msgplush.dll not msnmsgr.exe
But then again if you are not removing the menu bar then at HCBT_ACTIVATE it should work fine.
I order to test for the contactlist hwnd compare it with the handle provided by the messenger API
hope it helps, if you need any more clarifications let me know
Window Manager is discontinued, for WLM try the new,
Enhancer for contact list docking, auto-hide, hide taskbar button, remove button flashing and remember keyboard layout in conversation windows
|
|
08-24-2005 04:24 PM |
|
|
RaceProUK
Elite Member
Posts: 6073 Reputation: 57
39 / /
Joined: Oct 2003
|
O.P. RE: Hooking the Messenger Main Window
Thanks Demps for PMing TazDevil, and thanks TazDevil for the info. I did have the hook looking for HCBT_ACTIVATE, but I was then doing stuff with window class names. Had I thought to compare HWNDs, I'd have sorted this problem already.
As for the menu thing, I plan to add to the menus, not remove them. Would adding menus pose a problem, like removing them?
|
|
08-24-2005 05:38 PM |
|
|
TazDevil
Full Member
sleep(0);
Posts: 359 Reputation: 11
41 / /
Joined: May 2004
|
RE: Hooking the Messenger Main Window
quote: Originally posted by raceprouk
Thanks Demps for PMing TazDevil, and thanks TazDevil for the info. I did have the hook looking for HCBT_ACTIVATE, but I was then doing stuff with window class names. Had I thought to compare HWNDs, I'd have sorted this problem already.
As for the menu thing, I plan to add to the menus, not remove them. Would adding menus pose a problem, like removing them?
Happy to be of some help
No adding to the menu will not cause any problems, and it it quite easy to do as well you just GetMenu(hwnd) and just add menus with InsterMenuItem() etc, then catch WM_COMMAND messages sent/posted to the contact list window proc....
that is all about it
Window Manager is discontinued, for WLM try the new,
Enhancer for contact list docking, auto-hide, hide taskbar button, remove button flashing and remember keyboard layout in conversation windows
|
|
08-24-2005 05:48 PM |
|
|
Pages: (2):
« First
[ 1 ]
2
»
Last »
|
|