Re: Effective CMainFrame client area

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Scott McPhillips [MVP] (org-dot-mvps-at-scottmcp)
Date: 02/07/05


Date: Mon, 07 Feb 2005 07:57:02 -0500

LarryM wrote:
> Hi,
>
> Would anyone know how to determine the effective client area
> for CMainFrame after taking into consideration the area occupied
> by dockable controls such as tool and status bars.
>
> LarryM
> Ivyware Pty Ltd http://www.ivyware.com.au
>

This should be just what you need.

// Query MFC to compute remaining space in window.
RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST,
                 0, CWnd::reposQuery, &m_rect);

-- 
Scott McPhillips [VC++ MVP]