Share via


CWindow::GetWindowText

Retrieves the window's text.

int GetWindowText( 
   LPTSTR lpszStringBuf, 
   int nMaxCount  
) const throw(); 
BOOL GetWindowText( 
   BSTR& bstrText  
) throw();

Remarks

See GetWindowText in the Windows SDK.

The second version of this method allows you to store the text in a BSTR. If the text is successfully copied, the return value is TRUE; otherwise, the return value is FALSE.

Requirements

Header: atlwin.h

See Also

Reference

CWindow Class

CWindow::GetWindowTextLength

CWindow::SetWindowText