次の方法で共有


CWindow::GetWindowText

ウィンドウのテキストを取得します。

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

解説

Windows SDKの GetWindowText を参照してください。

このメソッドの 2 番目のバージョンは BSTRでテキストを格納することもできます。テキストが正常にコピーし、戻り値はです TRUE; それ以外の場合、戻り値は FALSEです。

必要条件

Header: atlwin.h

参照

関連項目

CWindow クラス

CWindow::GetWindowTextLength

CWindow::SetWindowText