Shoutbox

Getting a handle to the conversation HWND... - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Forum: Plug-Ins (/forumdisplay.php?fid=28)
+------ Thread: Getting a handle to the conversation HWND... (/showthread.php?tid=12648)

Getting a handle to the conversation HWND... by allex87 on 07-09-2003 at 01:53 PM

I am trying to get the HWND to the conversation window.. here's what I do...


PLUGIN_PARAM plParam;
IMessengerWindow *pIMessengerWindow = NULL;

plParam.iConversationWnd->QueryInterface(IID_IMessengerConversationWnd, (void **)&pIMessengerWindow);


It stops at the last line... :( the same method worked for the iMessengerObj in the Initialize() function.. I did:
iMessengerObj->QueryInterface(IID_IMessenger, (void **)&pIMessenger);

Is there anything I do wrong?
Thanks.


RE: Getting a handle to the conversation HWND... by allex87 on 07-09-2003 at 03:24 PM

Haha.. that's clever... thx a lot...


RE: Getting a handle to the conversation HWND... by RaceProUK on 07-12-2004 at 05:52 PM

quote:
Originally posted by allex87
I am trying to get the HWND to the conversation window.. here's what I do...


PLUGIN_PARAM plParam;
IMessengerWindow *pIMessengerWindow = NULL;

plParam.iConversationWnd->QueryInterface(IID_IMessengerConversationWnd, (void **)&pIMessengerWindow);


It stops at the last line... :( the same method worked for the iMessengerObj in the Initialize() function.. I did:
iMessengerObj->QueryInterface(IID_IMessenger, (void **)&pIMessenger);

Is there anything I do wrong?
Thanks.
I know it's been a short while since this has been read, but I can tell you what you've done wrong... you've used a NULL pointer to point to the interface returned. At least, I think this is what's causing it.
RE: Getting a handle to the conversation HWND... by Mnjul on 07-12-2004 at 06:14 PM

It's not very proper to bring up such a one-year-old thread...:S

I think

IMessengerWindow *pIMessengerWindow = NULL;


This should be

IMessengerConversationWnd *pIMessengerWindow = NULL;


As you are retrieving Conversation Window ;)


RE: Getting a handle to the conversation HWND... by CMI on 07-13-2004 at 12:24 AM

I think something is just plain wrong, as I can't get this to work in Visual Basic. Everything is null... Is it safe to say that MSN Messenger 6.2 3rd party development should just be halted as it makes people insane?


RE: Getting a handle to the conversation HWND... by RaceProUK on 07-13-2004 at 09:58 AM

It isn't safe to say, as that would include Plus.
If you want CMI, you can PM me your code, and I can have a look. A fresh mind may spot what is wrong.


RE: Getting a handle to the conversation HWND... by Dempsey on 07-13-2004 at 10:19 AM

CMI getting a handle to the conversation HWND in VB is easy!

code:
hMSN = FindWindow("IMWindowClass", vbNullString)

RE: RE: Getting a handle to the conversation HWND... by CMI on 07-13-2004 at 05:36 PM

quote:
Originally posted by Dempsey
CMI getting a handle to the conversation HWND in VB is easy!

code:
hMSN = FindWindow("IMWindowClass", vbNullString)


Whos to say there isn't more than one IM window open? I have no choice now but to find via friendly name I suppose, but people can have identical friendly names as well.
RE: Getting a handle to the conversation HWND... by Dempsey on 07-13-2004 at 06:04 PM

i thought u just wanted to get the current conversation


RE: Getting a handle to the conversation HWND... by Millenium_edition on 07-13-2004 at 07:52 PM

CMI: use enumwindows?


RE: Getting a handle to the conversation HWND... by CMI on 07-13-2004 at 08:29 PM

I could, but there is still no way too make certian that any particular window I come across in the one I want. Anyway, I had a typo, so I can get the handle through the normal means :)

Now I'm still having SendMessage problems though, but that would be a different thread :)