扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
//根据句柄获取子窗口指针 CWnd* pChildWnd=CWnd::FromHandle(FindWindowEx(pMainWnd->m_hWnd,NULL,"Worker",NULL)); if(!pChildWnd) pChildWnd=CWnd::FromHandle(FindWindowEx(pMainWnd->m_hWnd,NULL,"WorkerA",NULL)); |
CWnd* pChildNextWnd=CWnd::FromHandle(FindWindowEx(pMainWnd->m_hWnd,pChildWnd->m_hWnd,"Worker",NULL)); if(!pChildNextWnd) pChildNextWnd=CWnd::FromHandle(FindWindowEx(pMainWnd->m_hWnd,pChildWnd->m_hWnd,"WorkerA",NULL)); |
if(pChildNextWnd) { if(!(GetWindowLong(pChildWnd->m_hWnd,GWL_STYLE)&WS_VISIBLE)) { pTempWnd=NULL; pTempWnd=pMainWnd; //关闭广告窗口 …… return; } } |
pTempWnd->PostMessage(WM_CLOSE,0,0); |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。