What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Skype & Live Messenger » Hooking the Messenger Main Window

Pages: (2): « First [ 1 ] 2 » Last »
Hooking the Messenger Main Window
Author: Message:
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
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.
[Image: spartaafk.png]
08-20-2005 11:13 AM
Profile PM Web Find Quote Report
Stigmata
Veteran Member
*****



Posts: 3520
Reputation: 45
20 / Other / Flag
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 :P
08-20-2005 11:40 AM
Profile PM Web Find Quote Report
absorbation
Elite Member
*****

Avatar

Posts: 3636
Reputation: 81
– / Male / Flag
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
Profile PM Find Quote Report
Dempsey
Scripting Contest Winner
*****

Avatar
http://AdamDempsey.net

Posts: 2395
Reputation: 53
37 / Male / Flag
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.
SoundPacks   -   Scripts   -   Skins

that's not a bug, thats an unexpected feature
08-20-2005 12:02 PM
Profile E-Mail PM Web Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
O.P. RE: Hooking the Messenger Main Window
So I guess TazDevil uses some form of API hooking?
[Image: spartaafk.png]
08-20-2005 12:32 PM
Profile PM Web Find Quote Report
Dempsey
Scripting Contest Winner
*****

Avatar
http://AdamDempsey.net

Posts: 2395
Reputation: 53
37 / Male / Flag
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
SoundPacks   -   Scripts   -   Skins

that's not a bug, thats an unexpected feature
08-20-2005 12:34 PM
Profile E-Mail PM Web Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
O.P. RE: Hooking the Messenger Main Window
Strange no-one else has posted anything yet.
[Image: spartaafk.png]
08-24-2005 02:32 PM
Profile PM Web Find Quote Report
TazDevil
Full Member
***

Avatar
sleep(0);

Posts: 359
Reputation: 11
40 / Male / Flag
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
Profile PM Web Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
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?
[Image: spartaafk.png]
08-24-2005 05:38 PM
Profile PM Web Find Quote Report
TazDevil
Full Member
***

Avatar
sleep(0);

Posts: 359
Reputation: 11
40 / Male / Flag
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
Profile PM Web Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On