GetDlgItem

From aldeid
Jump to navigation Jump to search

Description

Retrieves a handle to a control in the specified dialog box.

Syntax

HWND WINAPI GetDlgItem(
  _In_opt_ HWND hDlg,
  _In_     int  nIDDlgItem
);

Parameters

hDlg [in, optional]
Type: HWND
A handle to the dialog box that contains the control.
nIDDlgItem [in]
Type: int
The identifier of the control to be retrieved.

Return value

Type: HWND

If the function succeeds, the return value is the window handle of the specified control.

If the function fails, the return value is NULL, indicating an invalid dialog box handle or a nonexistent control. To get extended error information, call GetLastError.