How can I embed a grid in a form view?

There is a sample gridsvw.cpp/.h (CSampleFormView) in gridapp.

The key point is that you have to override the OnInitialUpdate( ) for the CSampleFormView class and subclass the grid control as explained in the section "Using a grid with SubclassDlgItem in a dialog template":

void CSampleFormView::OnInitialUpdate( )
{
   CFormView::OnInitialUpdate( );
m_wndGrid.SubclassDlgItem(IDC_USER1, this);
m_wndGrid.Initialize( );
m_wndGrid.SetFocus( );
}