vc++初级问题3

来源:百度知道 编辑:UC知道 时间:2024/05/09 14:06:09
SetDlgItemText
在VC++里这个叫什么?API?还是什么?
哪里可以查到类似的这样的东西?

Sets the caption or text of a control owned by a window or dialog box.

void SetDlgItemText(
int nID,
LPCTSTR lpszString
);

Parameters
nID
Identifies the control whose text is to be set.

lpszString
Points to a CString object or null-terminated string that contains the text to be copied to the control.

Remarks
SetDlgItemText sends a WM_SETTEXT message to the given control.

Example
Copy Code
BOOL CDataDlg::OnInitDialog()
{
CDialog::OnInitDialog();

// Initialize dialog controls
SetDlgItemText(IDC_EDIT_NAME,"Type in text");
SetDlgItemInt(IDC_EDIT_NUM, 100);
return TRUE; // return TRUE unless you set the focus to a control
}

可以参考: msdn
MSDN2005地址ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.chs/dv_vclib/html/219c44dd-2386-4789-8225-dfd5522db4ec.htm