?
Solved

Figure out my app main screen size?

Posted on 1998-12-02
1
Medium Priority
?
164 Views
Last Modified: 2013-11-20
How do you figure out the main screen size?  For example when my program
first starts i start it at 640x480 that way I can keep easily manipulate the
dialogs that is opened.  But if they increase the size of the main screen
horizontally or vertically then i need to figure out the main window screen
size.
It doesnt seem to be GetSystemMetrics().  Is there an api or mfc api that
lets you get your applications main window?

THanks

0
Comment
Question by:eric07
[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
1 Comment
 

Accepted Solution

by:
McCreary earned 40 total points
ID: 1325654
RECT rect;
GetParent()->GetWindowRect(&rect);
If you are in the View, the GetParent() gets the CMainFrame window.
You might also want to use:
GetClientRect(&rect);

When the user resizes the window you get WM_SIZE message.  You can override the OnSize() virtual function if you need this notification.

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

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

771 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