求助:关于调用纯资源DLL的问题
想做一个多种语言版本的ARX,加载时根据系统的语言调用相应资源。virtual AcRx::AppRetCode On_kInitAppMsg (void *pkt) {
// TODO: Load dependencies here
// You *must* call On_kInitAppMsg here
AcRx::AppRetCode retCode =AcRxArxApp::On_kInitAppMsg (pkt) ;
try
{
LCID lcid = NULL;
lcid= GetThreadLocale();
lcid &= 0xFF;
switch(lcid)
{
case LANG_JAPANESE:
m_hLangDLL=: :LoadLibrary(TEXT("C:\\Japanese.dll"));
break;
case LANG_CHINESE:
m_hLangDLL=: :LoadLibrary(TEXT("C:\\Chinese.dll"));
break;
}
// TODO: Add your initialization code here
AfxSetResourceHandle(m_hLangDLL);
}
catch(CException* error)
{
TCHARstrError;
error->GetErrorMessage(strError,1000);
}
return (retCode) ;
}
virtual AcRx::AppRetCode On_kUnloadAppMsg (void *pkt) {
// TODO: Add your code here
// You *must* call On_kUnloadAppMsg here
AcRx::AppRetCode retCode =AcRxArxApp::On_kUnloadAppMsg (pkt) ;
// TODO: Unload dependencies here
if(m_hLangDLL)
AfxFreeLibrary(m_hLangDLL);
return (retCode) ;
}
virtual void RegisterServerComponents () {
}
// - Test1.Hello command (do not rename)
static void Test1Hello1Hello(void)
{
CAcModuleResourceOverride myResource;
CTestDlg dlg;
dlg.DoModal();
}
生成以后加载到CAD中时出现“非有效角度值”的提示。
能麻烦给解答一下吗。谢谢了!
我也遇到同样问题,期待高手解答
页:
[1]