CWnd::GetDlgItem

This method retrieves 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.

At a Glance

Header file: Afxwin.h
Platforms: H/PC 2.0, Palm-size PC, H/PC Pro
Windows CE versions: 1.0 and later
Complete documentation: Visual C++ documentation

Syntax

CWnd* GetDlgItem ( int nID ) const;

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

Remarks

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

See Also

CWnd::GetWindow, CWnd::GetDescendantWindow, CWnd::GetWindow