上一页 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 下一页
| { m_wndMDIClient.Detach(); //................. } int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1) return -1; if (m_wndMDIClient.Attach(m_hWndMDIClient) == 0) { TRACE0("Failed to attach MDIClient.\n"); return -1; // fail to create } //................. } //---------------------------------------------------------------- // This function finds the CMDIChildWnd in the list of Windows // maintained by the application's MDIClient window following the // one pointed to by the member variable m_pWndCurrentChild. If no // further CMDIChildWnds are in the list, NULL is returned. //---------------------------------------------------------------- CMDIChildWnd* CMainFrame::GetNextMDIChildWnd() { if (!m_pWndCurrentChild) { // Get the first child window. m_pWndCurrentChild = m_wndMDIClient.GetWindow(GW_CHILD); } else { // Get the next child window in the list. m_pWndCurrentChild= (CMDIChildWnd*)m_pWndCurrentChild->GetWindow(GW_HWNDNEXT); } if (!m_pWndCurrentChild) { // No child Windows exist in the MDIClient, // or you are at the end of the list. This check // will terminate any recursion. return NULL; } // Check the kind of window if (!m_pWndCurrentChild->GetWindow(GW_OWNER)) |
上一篇: C++类机制的实现细节
下一篇: 在一个程序中打开其它应用程序
上一页 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 下一页