我用MFCADO连接数据库,在debug下编译成功,在release编译成功,在我本机运行正常,但在非vc环境下datagrid控件动态创建失败。程序如下:
CDataGrid * m_pdatagrid1=NULL;
// TODO: Add your specialized code here and/or call the base class
CRect rect(10,10,400,250);
this->GetClientRect(&rect);
m_pdatagrid1=new CDataGrid;
if (m_pdatagrid1!=NULL)
{
if(!m_pdatagrid1->Create(NULL,_T(""),WS_CHILD|WS_VISIBLE, rect, this,7998))
{
AfxMessageBox(" grid 创建失败");
}
}
release编译后在非vc环境编译失败》
我已经注册了msdatgrd.ocx,
comcat.dll,
msbind.dll,
下面这个注册失败了。
stdftchs.dll我想可能是没有注册全,但不知还缺什么?
请高手指点。。急急急急急急急急急急

解决方案 »

  1.   

    这应该是dataGrid带了一些dll或ocx,
    我可能帮不上你,帮你顶上去吧,我也想知道,,
    如果你能静态创建就不要用动态了
      

  2.   

    把下面的五行保存在一个reg文件中,双击导入要运行你的程序的系统的注册表试试:
    REGEDIT
    HKEY_CLASSES_ROOT\Licenses = Licensing: Copying the keys may be a violation of established copyrights.// DataGrid Control 6.0 (OLEDB) license key
    HKEY_CLASSES_ROOT\Licenses\CDE57A55-8B86-11D0-b3C6-00A0C90AEA82 = ekpkhddkjkekpdjkqemkfkldoeoefkfdjfqe