Article ID: 148703
Article Last Modified on 11/21/2006
BOOL CAboutDlg::OnInitDialog()
{
// Call base class implementation
CDialog::OnInitDialog();
// Try to subclass the Grid control by calling SubclassDlgItem
m_gridctrl.SubclassDlgItem(IDC_GRID1, this);
return TRUE; // set focus to first control of the dialog
}
NOTE: In this code, IDC_GRID1 is the ID of the Grid control.
BOOL CAboutDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// Try to Subclass the Grid control by calling SubclassWindow
CWnd* pWnd = GetDlgItem(IDC_GRID1);
m_gridctrl.SubclassWindow(pWnd->m_hWnd);
return TRUE; // set focus to first control of the dialog
// Exception: OCX Property Pages should return FALSE
}
Additional query words: 4.00 ocx ole control
Keywords: kbbug kbctrl kbfix kbnoupdate kbvc410fix KB148703