GetWindow,GetWindowLong,SetWindowLong

  
例子:获得应用程序的标题名
CString strCaption;
CWnd*pWnd=AfxGetMainWnd()->GetWindow(GW_HWNDFIRST);
if(pWnd==NULL)
return;
while(pWnd)
{
if(pWnd->IsWindowVisible() &&pWnd->GetWindowTextLength() && !pWnd->GetOwner())
{
pWnd->GetWindowText(strCaption);
AfxMessageBox(strCaption);
}
pWnd=pWnd->GetWindow(GW_HWNDNEXT);
}

你可能感兴趣的:(GetWindow,GetWindowLong,SetWindowLong)