提示如下:
error LNK2001: unresolved external symbol "public: virtual struct CRuntimeClass * __thiscall CDataGrid::GetRuntimeClass(void)const " (?GetRuntimeClass@CDataGrid@@UBEPAUCRuntimeClass@@XZ)

解决方案 »

  1.   

    MSDN 搜索 Q151167 自己看吧!
      

  2.   

    MSDN  说:

    RESOLUTION
    Do not use static member variables in nested classes of class templates. 
    ”好像不是那样他所值的原因引起的。
      

  3.   

    把你的错误代码粘出来look,look
      

  4.   

    Lay a DataGrid control on a Dialog or FormView
    (Don't forget to import the CDataGrid class)
    then add a variable(For example :cDataGrid) for this control by
    using  ClassWizard.
    Then add codes in the place you want to bind your grid to Recordset
    as follows:
    ....
    cDataGrid.SetRefDataSource(NULL);
    cDataGrid.SetRefDataSource((LPUNKNOWN)m_pRecordset);
    cDataGrid.Refresh();
    ...