SetDlgItemInt function

Sets the text of a control in a dialog box to the string representation of a specified integer value.

Syntax


BOOL WINAPI SetDlgItemInt(
  _In_  HWND hDlg,
  _In_  int nIDDlgItem,
  _In_  UINT uValue,
  _In_  BOOL bSigned
);

Parameters

hDlg [in]

Type: HWND

A handle to the dialog box that contains the control.

nIDDlgItem [in]

Type: int

The control to be changed.

uValue [in]

Type: UINT

The integer value used to generate the item text.

bSigned [in]

Type: BOOL

Indicates whether the uValue parameter is signed or unsigned. If this parameter is TRUE, uValue is signed. If this parameter is TRUE and uValue is less than zero, a minus sign is placed before the first digit in the string. If this parameter is FALSE, uValue is unsigned.

Return value

Type: BOOL

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

To set the new text, this function sends a WM_SETTEXT message to the specified control.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winuser.h (include Windows.h)

Library

User32.lib

DLL

User32.dll

See also

Reference
GetDlgItemInt
SetDlgItemText
WM_SETTEXT
Conceptual
Dialog Boxes

 

 

Community Additions

ADD
Show:
© 2014 Microsoft