본문 바로가기
IT-개발,DB

[개발/VC++] 인터넷 익스플로러 윈도우 핸들 구하기

by SB리치퍼슨 2011. 2. 1.

쌈꼬쪼려 소백촌닭


 HWND hIEWnd;
 HWND hChildWnd;


 hIEWnd = FindWindow(_T("IEFrame"), NULL);
 
 hChildWnd = FindWindowEx(hIEWnd, 0, _T("Shell DocObject View"), NULL);

 //익스플로러 버전마다 틀리므로 아래의 체크를 거쳐야 합니다.
    if(hChildWnd == 0)
 {
        hChildWnd = FindWindowEx(hIEWnd, 0, _T("TabWindowClass"), NULL);
  
        if(hChildWnd == 0)
  {
   hChildWnd = FindWindowEx(hIEWnd, 0, _T("Frame Tab"), NULL);
   
            hChildWnd = FindWindowEx(hChildWnd, 0, _T("TabWindowClass"), NULL);
        }
  hChildWnd = FindWindowEx(hChildWnd, 0, _T("Shell DocObject View"), NULL);
 }
 if (hChildWnd != 0)
  hChildWnd = FindWindowEx(hChildWnd, 0, _T("Internet Explorer_Server"), NULL);

 

반응형

댓글