首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

用LoadImage加载位图资源,LR_SHARED什么用途

2013-01-08 
用LoadImage加载位图资源,LR_SHARED什么用处?如题!!!!!!!!!!!!!!!![解决办法]MSDN描述的很清楚的:LR_SHARE

用LoadImage加载位图资源,LR_SHARED什么用处?
如题!!!!!!!!!!!!!!!!
[解决办法]
MSDN描述的很清楚的:

LR_SHARED
Shares the image handle if the image is loaded multiple times. If LR_SHARED is not set, a second call to LoadImage for the same resource will load the image again and return a different handle. 
When you use this flag, the system will destroy the resource when it is no longer needed.

Do not use LR_SHARED for images that have non-standard sizes, that may change after loading, or that are loaded from a file.

When loading a system icon or cursor, you must use LR_SHARED or the function will fail to load the resource.

This function finds the first image in the cache with the requested resource name, regardless of the size requested.

[解决办法]
楼上英语不错啊。呵呵

补充下最后一句,没翻译,就是
该函数是根据内存中资源名来划分的,与资源大小要求无关。

热点排行