int GetZOrder(HWND hTarget) { int index = 0; HWND hNext = ::GetTopWindow(NULL); do { hNext = ::GetNextWindow(hNext, GW_HWNDNEXT); if (hNext == hTarget) break; ++index; } while (hNext); return index; } // 예 HWND hWnd1 = ::FindWindow(NULL, L"Daum - 모으다 잇다 흔들다 - Internet Explorer"); HWND hWnd2 = ::FindWindow(NULL, L"Google - Internet Explorer"); CString str; str.Format(_T("Daum %d; Google %d"), GetZOrder(hWnd1), GetZOrder(hWnd2)); OutputDebugString(str.GetBuffer(0));
Daum 255 Google 73
빠른 번호일수록 위
C++
Z-Order
윈도
Retrieved from http://hyacinth.byus.net/moniwiki/wiki.php/C++/(Windows)Z-Order 상위 윈도 비교
last modified 2014-08-13 10:30:54