c语言sscanf函数的用法是什么
278
2022-09-01
EnumChildWindows Function
The EnumChildWindows function enumerates the child windows that belong to the specified parent window by passing the handle to each child window, in turn, to an application-defined callback function. EnumChildWindows
主框架调用EnumChildWindows让每个子窗口都去执行SendPrepareToClose去做每个子窗口的清理工作。
BOOL CMainFrame::DestroyWindow(){ ::EnumChildWindows(m_hWnd, SendPrepareToClose, 0); return CMDIFrameWnd::DestroyWindow();} static BOOL CALLBACK SendPrepareToClose(HWND hWnd, LPARAM){ CWnd* pWnd = CWnd::FromHandlePermanent(hWnd); if (pWnd != NULL) { pWnd->SendMessage(WM_USER_PREPARE_TO_CLOSE); if (pWnd->GetWindow(GW_CHILD) != NULL) ::EnumChildWindows(pWnd->m_hWnd, SendPrepareToClose, 0); } return TRUE;}
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~