HWND hWnd = NULL; hWnd = ::FindWindow(_T("IEFrame"), NULL); if (hWnd) { HWND hWndChild = NULL; hWndChild = ::FindWindowEx(hWnd, 0, _T("Frame Tab"), NULL); if (hWndChild) { // tabbed hWndChild = ::FindWindowEx(hWndChild, 0, _T("TabWindowClass"), NULL); if (hWndChild) { ::PostMessage(hWndChild, WM_CLOSE, 0, 0); } } else { // not tabbed, close IE ::PostMessage(hWnd, WM_CLOSE, 0, 0); } }
*
IEFrame
= Top most IE
* Frame Tab = Tabs holder
*
TabWindowsClass
= Top most tab
[PNG image (11.84 KB)]
IE
Tab
Window Message
Windows
Retrieved from http://hyacinth.byus.net/moniwiki/wiki.php/C++/(Windows)IE 탭 종료
last modified 2013-09-17 16:18:28