What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [?] Getting the exact window position?

[?] Getting the exact window position?
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: [?] Getting the exact window position?
quote:
Originally posted by effection
I know that GetWindowRect gets the size of the window relevant to the top left corner of the window but is there anyway to get the position of the window relevant to the top left corner of the full screen?
You got your info a bit wrong there, and as such you actually answered your own question ;)

It is GetWindowRect which you need to use. Coordinates are given in screen coordinates that are relative to the upper-left corner of the screen.

This means you can know the position of the window relative to the screen as well as it size by either taking the coordinates in its 16 byte long RECT structure as-is, or by doing right - left and top - bottom.

quote:
Originally posted by Mnjul
I think you need GetWindowPos :)

SetWindowPos exists, but not GetWindowPos


------------------------------------------------------------

So you need to use either:
GetWindowRect
GetWindowRgn (if window is not rectangular)
GetWindowInfo (if you also need other info at the same time)

all defined in User32.dll


;)

This post was edited on 12-24-2006 at 06:50 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
12-24-2006 06:28 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[?] Getting the exact window position? - by effection on 12-24-2006 at 05:07 PM
RE: [?] Getting the exact window position? - by Mnjul on 12-24-2006 at 06:16 PM
RE: [?] Getting the exact window position? - by CookieRevised on 12-24-2006 at 06:28 PM
RE: [?] Getting the exact window position? - by effection on 12-24-2006 at 08:45 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