Chinaunix首页 | 论坛 | 博客
  • 博客访问: 411675
  • 博文数量: 95
  • 博客积分: 5001
  • 博客等级: 大校
  • 技术积分: 1030
  • 用 户 组: 普通用户
  • 注册时间: 2007-05-13 11:43
文章分类

全部博文(95)

文章存档

2007年(95)

我的朋友

分类: C/C++

2007-07-27 23:28:07

CWindow::GetDlgItemText

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 );



CWindow::SetDlgItemInt

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.



CWindow::GetDlgItemInt

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.



CWnd::UpdateData

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); 界面数据-->程序变量
UpdateData(FALSE); 程序变量--->界面数据

阅读(1429) | 评论(0) | 转发(0) |
0

上一篇: Visual C++.NET中 字符串

下一篇:CString

给主人留下些什么吧!~~