Figure out my app main screen size?

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
It doesnt seem to be GetSystemMetrics().  Is there an api or mfc api that
lets you get your applications main window?


Who is Participating?
McCrearyConnect With a Mentor Commented:
RECT rect;
If you are in the View, the GetParent() gets the CMainFrame window.
You might also want to use:

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

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.