Manipulating window position given 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: Manipulating window position given hwnd (/showthread.php?tid=51955) Manipulating window position given hwnd by eSouL on 10-19-2005 at 10:21 AM
Hi, RE: Manipulating window position given hwnd by RaceProUK on 10-19-2005 at 01:58 PM I think a better solution would be to hide the window the proper way, by using ShowWindow() with the HWND. RE: Manipulating window position given hwnd by eSouL on 10-19-2005 at 03:02 PM 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. RE: Manipulating window position given hwnd by Millenium_edition on 10-19-2005 at 03:11 PM GetWindowRect and SetWindowPos? RE: Manipulating window position given hwnd by CookieRevised on 10-19-2005 at 08:03 PM
quote: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: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) RE: Manipulating window position given hwnd by eSouL on 10-20-2005 at 04:03 AM Thanks for the reply Cookie. After reading them, I tried to rewrite some part of my code and indeed, much to my delight, PostMessage can be sent to a hidden window SetWindowPos worked fine too but now that I don't need to change coordinates, I return to the good old ShowWindow function. Thanks again! RE: Manipulating window position given hwnd by RaceProUK on 10-27-2005 at 12:04 PM
quote:Which is what I suggested before! quote: |