CDaoRecordView::CDaoRecordView

CDaoRecordView( LPCSTR lpszTemplateName );

CDaoRecordView( UINT nIDTemplate );

Parameters

lpszTemplateName

Contains a null-terminated string that is the name of a dialog template resource.

nIDTemplate

Contains the ID number of a dialog template resource.

Remarks

When you create an object of a type derived from CDaoRecordView, call either form of the constructor to initialize the view object and identify the dialog resource on which the view is based. You can either identify the resource by name (pass a string as the argument to the constructor) or by its ID (pass an unsigned integer as the argument). Using a resource ID is recommended.

Note   Your derived class must supply its own constructor. In the constructor of your derived class, call the constructor CDaoRecordView::CDaoRecordView with the resource name or ID as an argument.

CDaoRecordView::OnInitialUpdate calls CWnd::UpdateData, which calls CWnd::DoDataExchange. This initial call to DoDataExchange connects CDaoRecordView controls (indirectly) to CDaoRecordset field data members created by ClassWizard. These data members cannot be used until after you call the base class CFormView::OnInitialUpdate member function.

Note   If you use ClassWizard, the wizard defines an enum value CDaoRecordView::IDD and specifies it in the member initialization list for the constructor where you see IDD_MYFORM.

CMyRecordView::CMyRecordView()

   : CDaoRecordView( IDD_MYFORM )
{
   //{{AFX_DATA_INIT( CMyRecordView )
      // NOTE: the ClassWizard will add member initialization here
   //}}AFX_DATA_INIT
   // Other construction code, such as data initialization
}

CDaoRecordView OverviewClass MembersHierarchy Chart

See Also   CWnd::UpdateData, CWnd::DoDataExchange