GetDlgCtrlID

3.0

  int GetDlgCtrlID(hwnd)    
  HWND hwnd; /* handle of child window */

The GetDlgCtrlID function returns a handle of a child window.

Parameters

hwnd

Identifies the child window.

Return Value

The return value is a handle of the child window if the function is successful. Otherwise, it is NULL.

Comments

This function returns a handle of any child window, not just that of a control in a dialog box.

Since top-level windows do not have an identifier, the GetDlgCtrlID function's return value is invalid if the hwnd parameter identifies a top-level window.

See Also

GetDlgItem, GetDlgItemInt, GetDlgItemText