CWindow::GetWindowRect This method retrieves the window's bounding dimensions.Syntax BOOL GetWindowRect( LPRECT lpRect ) const;At a Glance Header file: Atlwin.h Platforms: Versions: Version 2.0 and later Complete documentation: Visual C++ documentation See Also CWindow Overview, CWindow Methods, CWindow::GetClientRect
This method retrieves the window's bounding dimensions.Syntax
BOOL GetWindowRect( LPRECT lpRect ) const;At a Glance
Header file: Atlwin.h
Platforms:
Versions: Version 2.0 and later
Complete documentation: Visual C++ documentation
See Also
CWindow Overview, CWindow Methods, CWindow::GetClientRect
void CMainWindow::SaveWindowState ()
{
CString version = _T ("Version 1.0");
myApp.WriteProfileInt (version, _T ("FullWindow"), m_bFullWindow);
myApp.WriteProfileInt (version, _T ("StayOnTop"), m_bStayOnTop); WINDOWPLACEMENT wp;
wp.length = sizeof (WINDOWPLACEMENT);
GetWindowPlacement (&wp); myApp.WriteProfileInt (version, _T ("flags"), wp.flags);
myApp.WriteProfileInt (version, _T ("showCmd"), wp.showCmd);
myApp.WriteProfileInt (version, _T ("x1"), wp.rcNormalPosition.left);
myApp.WriteProfileInt (version, _T ("y1"), wp.rcNormalPosition.top);
myApp.WriteProfileInt (version, _T ("x2"), wp.rcNormalPosition.right);
myApp.WriteProfileInt (version, _T ("y2"), wp.rcNormalPosition.bottom);