分类: C/C++
2007-07-27 23:28:07
UINT GetDlgItemText( int nID, LPTSTR lpStr, int nMaxCount ) const;
BOOL GetDlgItemText( int nID, BSTR& bstrText ) const;
See in the Win32 SDK.
Remarks
Retrieves a control’s text. The second version of this method allows you to copy the control’s text to a BSTR. This version returns TRUE if the text is successfully copied; otherwise, FALSE.
GetDlgItemText(IDC_EDIT3,this->IpAddress );
GetDlgItemText(IDC_EDIT1,this->UserName );
GetDlgItemText(IDC_EDIT2,this->Password );
BOOL SetDlgItemInt( int nID, UINT
nValue, BOOL bSigned = TRUE
); See
in the Win32 SDK. Remarks Changes a control’s text to the string representation of an integer value.
UINT GetDlgItemInt( int nID, BOOL*
lpTrans = NULL, BOOL bSigned =
TRUE ) const; See
in the Win32 SDK. Remarks Translates a control’s text to an integer.
BOOL UpdateData( BOOL bSaveAndValidate =
TRUE ); Return Value Nonzero if the operation is successful; otherwise 0. If
bSaveAndValidate is TRUE, then a return value of nonzero means
that the data is successfully validated. Parameters bSaveAndValidate Flag that indicates whether dialog box is being initialized
(FALSE) or data is being retrieved (TRUE). Remarks Call this member function to initialize data in a dialog box, or to retrieve
and validate dialog data. The framework automatically calls UpdateData with
bSaveAndValidate set to FALSE when a modal dialog box is created
in the default implementation of . The call
occurs before the dialog box is visible. The default implementation of calls this member function
with bSaveAndValidate set to TRUE to retrieve the data, and if
successful, will close the dialog box. (If the Cancel button is clicked in the
dialog box, the dialog box is closed without the data being retrieved.) UpdateData(TRUE); 界面数据-->程序变量CWindow::SetDlgItemInt
CWindow::GetDlgItemInt
CWnd::UpdateData
UpdateData(FALSE); 程序变量--->界面数据