What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » Manipulating window position given hwnd

Manipulating window position given hwnd
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Manipulating window position given hwnd
quote:
Originally posted by eSouL
I can't use ShowWindow(). I need to PostMessage() to the conversation window so I have to activate the window for a brief moment before returning control to my custom window. If the conversation window is visible on screen, it will create flickerings when I do so. Hence it needs to stay at a negative x position area. But I want a way to bring it back. The MoveWindow() function is a bit buggy.
API's like MoveWindow(), etc aren't buggy at all. They work absolutely perfect. The use of them (aka your own code) is most likely buggy if you experience abnormalities.

Instead of hiding a window you can also minimize it. in general speaking, activating a window, showing/hiding it, restoring/minimizing it are three different independant things.

Also, why do you need PostMessage()? It is quite possible that with another method you do not need the 'PostMessage() approach' at all. Also, in normal circumstances, this API doesn't require you to activate a window, since it send its message to the handle of a window, not to the activate window. But all this depends on what you want do and what your current code is.

But why do you ask how to change the 'Left' coordinate of a window when you first said:
quote:
Originally posted by eSouL
My plugin hides a conversation window (IMessengerConversationWnd object) by changing its 'Left' property to -20000
Don't this mean you already know how to set the 'Left'?...

Finally, to simply change a coordinate you indeed could also use SetWindowPos(), like ME said. But this is in general, it highly depends on your overall code. Because most stuff can be greatly optimized or done in another shorter approach. And many Window API's already contain ways to set coordinates strait away, without using additional API's. So it all strongly depends on your current code to do it in the proper and/or efficient way.

PS: notice that I linked all the API's talked about to the MSDN Library. This should be your number one stop to get info about the API's (not some other website which only provides half the info) ;)

This post was edited on 10-19-2005 at 08:33 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
10-19-2005 08:03 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Manipulating window position given hwnd - by eSouL on 10-19-2005 at 10:21 AM
RE: Manipulating window position given hwnd - by RaceProUK on 10-19-2005 at 01:58 PM
RE: Manipulating window position given hwnd - by eSouL on 10-19-2005 at 03:02 PM
RE: Manipulating window position given hwnd - by Millenium_edition on 10-19-2005 at 03:11 PM
RE: Manipulating window position given hwnd - by CookieRevised on 10-19-2005 at 08:03 PM
RE: Manipulating window position given hwnd - by eSouL on 10-20-2005 at 04:03 AM
RE: Manipulating window position given hwnd - by RaceProUK on 10-27-2005 at 12:04 PM


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