    _______________385

  wCmd      .     wCmd  =
GW_HWNDNEXT,    ,  .  wCmd =
GW_HWNDPREV,    ,  .

   Z-   ,    -
         .
   ,      .

   ,    .  -
     (    wCmd),  -
 0.

     GetNextWindow  
   .         API
Windows  GetWindowText.    ,   -
 ,   .    :

int GetWindowText(HWND hWnd, char *lpString, int nMaxCount);

 hWnd   .  IpString   , 
  .  nMaxCount   
 .        ,
 .

   ,    
,    .      -
    ,     -
 .

    ,     :

     .  -
     :

HWND H ^Handle;

char Pch[128] ;

do
{

H = GetNextWindow(H,GW_HWNDNEXT);

GetWindowText(H,Pch,128) ;

if(CompareText(Pch, "") == )
break;

} while (H != NULL) ;

if (H != NULL)

       
Handle   .     , -
   Z-,        -
.     CompareText,    -
 ,    Pch,   .  
,  CompareText  .  ,  C++ -
       ,   if
       :

if( ! CompareText(Pch, ""))

   ,       -
 .  ,     
          -
   ,     .

      = NULL,   -
     .   -  ,  
   ,    .

13 .764