Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer


Returns the window or control ID value for any child window, not only that of a control in a dialog box.

int GetDlgCtrlID( ) const;

The numeric identifier of the CWnd child window if the function is successful; otherwise 0.

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

See the example for CWnd::OnCtlColor.

© 2015 Microsoft