次の方法で共有


SetDlgItemText (Compact 2013)

3/28/2014

This function sets the title or text of a control in a dialog box.

Syntax

BOOL SetDlgItemText( 
  HWND hDlg, 
  int nIDDlgItem, 
  LPCTSTR lpString
); 

Parameters

  • hDlg
    [in] Handle to the dialog box that contains the control.
  • nIDDlgItem
    [in] Identifies the control with a title or text that is to be set.
  • lpString
    [in] Long pointer to the null-terminated string that contains the text to be copied to the control.

Return Value

Nonzero indicates success. Zero indicates failure. To get extended error information, call GetLastError.

Remarks

The SetDlgItemText function sends a WM_SETTEXT message to the specified control.

Requirements

Header

winuser.h

Library

Dlgmgr.lib

See Also

Reference

Dialog Box Functions
GetDlgItemInt
GetDlgItemText
SetDlgItemInt
WM_SETTEXT