Solved

Figure out my app main screen size?

Posted on 1998-12-02
1
158 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
1 Comment
 

Accepted Solution

by:
McCreary earned 20 total points
Comment Utility
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.

728 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now