Microsoft Developer Network > 포럼 홈 > Visual C++ General > Resizing a MDI child window programatically in maximized state
질문하기질문하기
 

답변됨Resizing a MDI child window programatically in maximized state

  • 2009년 11월 4일 수요일 오후 2:52Sajan Emmanuel 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    Dear all,
    I have a MFC MDI application in VS 2003. In one of my view classes, I am embedding an OCX control. I just need to provide an option to resize the view class(CView derived).  I tried the below code.
    CRect rectClient;   
            GetClientRect(&rectClient);
            CRect r(0, 0, m_XVideoOCXCtrl.XGetWidth(), m_XVideoOCXCtrl.XGetHeight());
            GetParentFrame()->SetWindowPos(NULL, 0, 0,  r.Width() + CAM_DOUBLEBORDER, r.Height() + CAM_DOUBLEBORDER, SWP_SHOWWINDOW);
    GetParentFrame()->ShowWindow(SW_SHOW);

    This is working fine when my view(MDI Child window) class is not in the maximized state. But when i try to execute the same code in the maximized state, the view class is scaled to the correct size, but I am missing the control box of the window. Can any body tell, how can re size the MDI Child window perfectly in maximized state.

    • 편집됨Sajan Emmanuel 2009년 11월 4일 수요일 오후 5:14Corrected spelling
    •  

답변

모든 응답