Visual Studio 2010 - Visual C++
CWnd::SetDlgItemText
Sets the caption or text of a control owned by a window or dialog box.
void SetDlgItemText( int nID, LPCTSTR lpszString );
Parameters
Remarks
SetDlgItemText sends a WM_SETTEXT message to the given control.
Example
Visual C++
// The following code fragment is from CMyDlg::OnInitDialog // CMyDlg is derived from CDialog. // Initialize dialog controls SetDlgItemText(IDC_EDITNAME, _T("Type in text")); SetDlgItemInt(IDC_EDITNUM, 100);
Requirements
Header: afxwin.h
See Also