BOOL SetDlgItemText(hwndDlg, idControl, lpsz) | |||||
HWND hwndDlg; | /* handle of dialog box | */ | |||
int idControl; | /* identifier of control | */ | |||
LPCTSTR lpsz; | /* text to set | */ |
The SetDlgItemText function sets the title or text of a control in a dialog box.
hwndDlg
Identifies the dialog box that contains the control.
idControl
Identifies the control whose text is to be set.
lpsz
Points to the null-terminated string that contains the text to be copied to the control.
The return value is TRUE if the function was successful, or FALSE if an error occurred. Use the GetLastError function to obtain extended error information.
The SetDlgItemText function sends a WM_SETTEXT message to the given control.
The SetDlgItemText function may be used as either a wide-character function (where text arguments must use Unicode) or an ANSI function (where text arguments must use characters from the Windows 3.x character set
GetDlgItemText, GetDlgItemInt, SetDlgItemInt