CWnd::GetDlgItem

Call this member function to retrieve a pointer to the specified control or child window in a dialog box or other window. The pointer returned is usually cast to the type of control identified by nID.

Syntax

CWnd* GetDlgItem ( int nID ) const;

void CWnd::GetDlgItem( int nID, HWND* phWnd ) const;

At a Glance

Header File Afxwin.h
Platforms
Versions 1.0 and later
Complete documentation Visual C++ documentation

Remarks

In Windows CE, the CDialog::GetDlgItem member function only applies to the immediate child controls of a dialog box. It does not search through nested dialog boxes.

See Also

CWnd Overview, CWnd Member Functions, Window Class Categories, CWnd::GetWindow, CWnd::GetDescendantWindow, CWnd::GetWindow