海阔天空

海阔凭鱼跃 天高任鸟飞

 

DLL中资源和主程序资源冲突

    HMODULE hDll = NULL;
#ifdef _DEBUG
    hDll = GetModuleHandle(_T("libetmgrauditcsd.dll"));
#else
    hDll = GetModuleHandle(_T("libetmgrauditcs.dll"));
#endif
    
    HINSTANCE hExe = AfxGetResourceHandle();
    AfxSetResourceHandle((HINSTANCE)hDll);

    //m_pview = new CCsLogFileView;
    m_pview = new CMyFormView;
    
    // TODO: ((CCsLogFileView*)m_pview)->SetParas(strJpgFolder, nTimeInternal);
    BOOL bRet = m_pview->Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext);
    AfxSetResourceHandle(hExe);

posted on 2010-05-26 13:57  liuym  阅读(284)  评论(0编辑  收藏  举报

导航