多语言使用DLL方式如何做到不需要重启应用程序?

Kaile 2005-09-01 11:05:24
我们一个通用软件是简繁英三种语言版本,目前采用了资源DLL方式,不过每次换语言时需要重启,请问有什么办法可以解决?

...全文
513 33 打赏 收藏 转发到动态 举报
写回复
用AI写文章
33 条回复
切换为时间正序
请发表友善的回复…
发表回复
farer01 2006-04-22
  • 打赏
  • 举报
回复
多语言支持组件LocNuke(国际通本地化核武器)


一、概述

欢迎使用全球领先的多语言解决方案。
这是一个创新的多语言软件开发工具,它使用类似于文本文件的外挂语言包提供Win32软件的多语言支持。
它是一个领先的具有丰富特色的解决方案满足您软件全球化的需要。
通过LocNuke,您可以轻易迅速地拥有完全多语言支持的应用程序。仅需一会就可以创建首个您的全球通行的应用程序;也仅需很少的代码就可以使现有的应用程序拥有多语言功能。

支持Unicode/ANSI变异,同时支持Unicode/ANSI语言包,拥有智能语言技术并支持多语言平台

二、功能
1.低成本灵活方便动态支持多语言:增加和修改语种文字仅需文员用记事本增修外挂语言包;
2.比普通的语言资源Dll的多语言支持能力更为超强和灵活便利成本低廉;
2.编程方便、代价小、入门要求低;
3.支持操作系统范围广:支持Windows9x/Me和Windows2K/XP;
4.支持语言种类众多:只要Windows记事本支持显示的文字,一般都可以通用支持,在Win2K/XP上甚至能支持连Windows记事本也不能显示的文字。


国外比我的差但是很来钱License copies Price per copy Subscription renewal

1-4 licenses US $249.95 US $70.00

5-10 licenses US $219.95 US $60.00 11-Unlimited licenses US $179.95 US $50.00

Corporate License US $3000.00 US $750.00
szvc@163.com
qq:9815283
msn:szvb@163.com
crazycyber 2006-04-08
  • 打赏
  • 举报
回复
程序起来的时候,就全读进去
shadowWind 2005-11-12
  • 打赏
  • 举报
回复
mark
nlstone 2005-09-07
  • 打赏
  • 举报
回复
huxzjqhh(黑石)的代码似乎并不能直接实现运行期动态更改语言。

楼主这样试过没有,加载新的资源以后,重新loadmenu,setmenu(toolbar类推)不行吗?
Kaile 2005-09-07
  • 打赏
  • 举报
回复
好象不行
flashget , bitspirit都实现了,人家确实牛
nlstone 2005-09-06
  • 打赏
  • 举报
回复
还真没做过,楼主自己试验的结果如何? 往这些控件发一个paint消息如何?
Kaile 2005-09-06
  • 打赏
  • 举报
回复
请给一下例子代码,谢谢
teli_eurydice 2005-09-06
  • 打赏
  • 举报
回复
似乎很麻烦,up
huxzjqhh 2005-09-06
  • 打赏
  • 举报
回复
The following example copies a dialog box resource from one executable file, Hand.exe, to another, Foot.exe

HRSRC hResLoad; // handle to loaded resource
HANDLE hExe; // handle to existing .EXE file
HRSRC hRes; // handle/ptr. to res. info. in hExe
HANDLE hUpdateRes; // update resource handle
char *lpResLock; // pointer to resource data
BOOL result;
// Load the .EXE file that contains the dialog box you want to copy.
hExe = LoadLibrary("hand.exe");
if (hExe == NULL)
{
ErrorHandler("Could not load exe.");
}

// Locate the dialog box resource in the .EXE file.
hRes = FindResource(hExe, "AboutBox", RT_DIALOG);
if (hRes == NULL)
{
ErrorHandler("Could not locate dialog box.");
}

// Load the dialog box into global memory.
hResLoad = LoadResource(hExe, hRes);
if (hResLoad == NULL)
{
ErrorHandler("Could not load dialog box.");
}

// Lock the dialog box into global memory.
lpResLock = LockResource(hResLoad);
if (lpResLock == NULL)
{
ErrorHandler("Could not lock dialog box.");
}

// Open the file to which you want to add the dialog box resource.
hUpdateRes = BeginUpdateResource("foot.exe", FALSE);
if (hUpdateRes == NULL)
{
ErrorHandler("Could not open file for writing.");
}

// Add the dialog box resource to the update list.
result = UpdateResource(hUpdateRes, // update resource handle
RT_DIALOG, // change dialog box resource
"AboutBox", // dialog box name
MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), // neutral language
lpResLock, // ptr to resource info
SizeofResource(hExe, hRes)); // size of resource info.
if (result == FALSE)
{
ErrorHandler("Could not add resource.");
}

// Write changes to FOOT.EXE and then close it.
if (!EndUpdateResource(hUpdateRes, FALSE))
{
ErrorHandler("Could not write changes to file.");
}

// Clean up.
if (!FreeLibrary(hExe))
{
ErrorHandler("Could not free executable.");
}
huxzjqhh 2005-09-06
  • 打赏
  • 举报
回复
The UpdateResource function adds, deletes, or replaces a resource in an executable file.

Syntax

BOOL UpdateResource( HANDLE hUpdate,
LPCTSTR lpType,
LPCTSTR lpName,
WORD wLanguage,
LPVOID lpData,
DWORD cbData
);
Kaile 2005-09-06
  • 打赏
  • 举报
回复
PAINT消息应该不行吧,没有重取资源,不知道用什么消息好。
billy145533 2005-09-05
  • 打赏
  • 举报
回复
发送更新消息到所有窗口
Kaile 2005-09-05
  • 打赏
  • 举报
回复
有人能帮我吗?
Kaile 2005-09-04
  • 打赏
  • 举报
回复
din myself
Kaile 2005-09-02
  • 打赏
  • 举报
回复
大家来帮忙
youqingsky 2005-09-02
  • 打赏
  • 举报
回复
没见过这方面的东档,关注中。。。
everandforever 2005-09-01
  • 打赏
  • 举报
回复
你启动时菜单,toolbar中的文字是怎么设置的,就怎么刷新一遍
Kaile 2005-09-01
  • 打赏
  • 举报
回复
菜单,toolbar也要销毁再创建?
nonocast 2005-09-01
  • 打赏
  • 举报
回复
dialog中可以套dialog
nonocast 2005-09-01
  • 打赏
  • 举报
回复
销毁dialog再创建
加载更多回复(13)

16,471

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧