?
Solved

GetAllWindowPos()

Posted on 1999-01-25
2
Medium Priority
?
373 Views
Last Modified: 2008-02-01
I want to get the possition of a child window, and the main window Like this:

RECT GetWindowPos(hwnd); {But if i call the get rect function, it tells me that my rect.left always = 0
0
Comment
Question by:win32
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 8

Accepted Solution

by:
Answers2000 earned 40 total points
ID: 1185114
I think you mean GetWindowRect

RECT rect ;
::GetWindowRect( hWnd, &rect ) ;

This will return screen coordinates of a window.  If you need them in client coords (e.g. for a child) use ScreenToClient

::ScreenToClient( GetParent(hWnd), (LPPOINT)&(rect.left) ) ;
::ScreenToClient( GetParent(hWnd), (LPPOINT)&(rect.right) ) ;
0
 

Author Comment

by:win32
ID: 1185115
Year That works fine Thanks !!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question