クライアント領域サイズの CMDIChildWnd
BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
{
if (!CMDIChildWnd::PreCreateWindow(cs))
return FALSE;
HWND hWnd = ((CMDIFrameWnd*)AfxGetMainWnd())->m_hWndMDIClient;
CRect rc;
::GetClientRect(hWnd, &rc);
// ::AdjustWindowRectEx(&rc, cs.style, FALSE, cs.dwExStyle);
cs.x = rc.left;
cs.y = rc.top;
cs.cx = rc.Width();
cs.cy = rc.Height();
return TRUE;
}
| 固定リンク

