楼上的高手, 我想人家是指用他的程序去替换别的exe文件的图标.可以用替换资源的api函数完成,具体叫什么的我记不太清楚了, 不好意思啊:-) 好像是 The UpdateResource function adds, deletes, or replaces a resource in an executable file. BOOL UpdateResource( HANDLE hUpdate, // update-file handle LPCTSTR lpType, // address of resource type to update LPCTSTR lpName, // address of resource name to update WORD wLanguage, // language identifier of resource LPVOID lpData, // address of resource data DWORD cbData // length of resource data, in bytes );
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwui/html/msdn_icons.asp
我的问题是,用户选择的图标多种多样,可能是256色的,可能是16色的,虽然我可以限制
图标是32*32的,但是图标的尺寸仍然是不一样的。我用查找关键字的方法替换
原有的图标,结果可执行文件不能正常显示图标,甚至不能执行。所以我想知道别人是如何
实现的。
太简单的了,
分别把两个图标替换就行
好像是
The UpdateResource function adds, deletes, or replaces a resource in an executable file. BOOL UpdateResource(
HANDLE hUpdate, // update-file handle
LPCTSTR lpType, // address of resource type to update
LPCTSTR lpName, // address of resource name to update
WORD wLanguage, // language identifier of resource
LPVOID lpData, // address of resource data
DWORD cbData // length of resource data, in bytes
);
现在我想将用户选择的图标或者位图都换成真彩32*32的真彩图标,再替换工具书里
已有的32*32的真彩图标,不知道这样行不行。我的程序是草履虫电子书制作工具,希望大家喜欢。
http://www.readever.net