+ Reply to Thread
Results 1 to 2 of 2

Thread: How to enumerate all the child windows of given Window using WIN32 API?

  1. #1
    Junior Member
    Join Date
    Feb 2012
    Posts
    48

    How to enumerate all the child windows of given Window using WIN32 API?

    How to enumerate all the child windows of given Window using WIN32 API?

  2. #2
    Senior Member
    Join Date
    Feb 2012
    Posts
    109
    You can use EnumChildWindows for this.

    Example:

    Code:
    BOOL CALLBACK MyEnumWindowsProc(HWND hwnd, LPARAM lParam)
    {
    	TCHAR szWindowText[100] ;
    	::GetWindowText(hwnd, szWindowText, 100) ;
    
    	OutputDebugString(szWindowText) ;
    	OutputDebugString("\r\n") ;
    
    	return TRUE ;
    }
    
    void EnumChildWindows(HWND hWnd)
    {
    	EnumChildWindows(hWnd, MyEnumWindowsProc, NULL) ;
    }

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts