?
Solved

Get Window dimensions

Posted on 2006-06-29
2
Medium Priority
?
409 Views
Last Modified: 2008-03-03
I am writing a win32 application, which draws an ellipse to the size of the form.  The problem is it draws the left
and right too big.  I am currently using GetWindowRect to get the size of the window.  How can I get the true right
and bottom values of the DRAWABLE area?  I know I could keep guessing until it looks right, but I assume that will
be inaccurate when moving to other computers.
0
Comment
Question by:List244
[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 86

Accepted Solution

by:
jkr earned 1000 total points
ID: 17015044
Just use 'GetClientRect()', that's the information you are looking for - see http://windowssdk.msdn.microsoft.com/en-us/library/ms633503.aspx ("GetClientRect"):

"The GetClientRect function retrieves the coordinates of a window's client area. The client coordinates specify the upper-left and lower-right corners of the client area. Because client coordinates are relative to the upper-left corner of a window's client area, the coordinates of the upper-left corner are (0,0)."
0
 
LVL 8

Author Comment

by:List244
ID: 17015178
Perfect, thanks.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

752 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