Click to See Complete Forum and Search --> : Getting "real" client-area of a FrameWnd


C. Sonntag
May 5th, 1999, 08:55 AM
Hi!

I'm trying to get the size of the "real" client-area of the Framewindow of my MDI-application. That means the rectangle excluding all toolbars, statusbars and the menu.

I would be very pleased if somebody could help me

Regards

C. Sonntag

Natali Levit
May 7th, 1999, 03:08 AM
The best way to do it is to use
CWnd::GetClientRect( LPRECT lpRect )function, or the same API function
BOOL GetClientRect( HWND hWnd,LPRECT lpRect );

Cristi Posea
May 7th, 1999, 03:23 PM
Try this:

CRect rc;
pMainFrame->RepositionBars(0, 0xFFFF, AFX_IDW_PANE_FIRST, reposQuery, &rc, NULL, TRUE);

The only restriction is to take care if calling from inside controlbar layout.