GetDlgCtrlID

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

This function returns the ID value of the child window identified by the hwnd parameter.

Parameters

hwnd

Identifies the child window.

Return Value

The return value is the numeric identifier of the child window if the function is successful. If the function fails, or if hwnd is not a valid window handle, the return value is NULL.

Comments

Since top-level windows do not have an ID value, the return value of this function is invalid if the hwnd parameter identifies a top-level window.