得到MID子窗口指针
CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
// Get the active MDI child window.
CMDIChildWnd *pChild = (CMDIChildWnd *)pFrame->GetActiveFrame();
// or CMDIChildWnd *pChild = pFrame->MDIGetActive();
// Get the active view attached to the active MDI child window.
CSerialDataView *pView = (CSerialDataView*)pChild->GetActiveView();
// Get the active MDI child window.
CMDIChildWnd *pChild = (CMDIChildWnd *)pFrame->GetActiveFrame();
// or CMDIChildWnd *pChild = pFrame->MDIGetActive();
// Get the active view attached to the active MDI child window.
CSerialDataView *pView = (CSerialDataView*)pChild->GetActiveView();
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.