共用方式為


CWindow::GetWindowText

擷取視窗中的文字。

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

備註

請參閱在 Windows SDK的 GetWindowText

這個方法的第二個版本在 BSTR允許您儲存文字。 如果文字已順利複製,則傳回值為 ;否則,傳回值為

需求

Header: atlwin.h

請參閱

參考

CWindow Class

CWindow::GetWindowTextLength

CWindow::SetWindowText