MAKEINTRESOURCE如何处理 大于等于0x8000的bitamp资源

ljlixian1   2009-8-10 15:50 楼主
bitmap = (HBITMAP)LoadBitmap(m_hRes,MAKEINTRESOURCE(0x8000));
失败了....

回复评论 (3)

不知楼主什么意思
点赞  2009-8-11 22:24
#define MAKEINTRESOURCEA(i) ((LPSTR)((ULONG_PTR)((WORD)(i))))
#define MAKEINTRESOURCEW(i) ((LPWSTR)((ULONG_PTR)((WORD)(i))))
#ifdef UNICODE
#define MAKEINTRESOURCE  MAKEINTRESOURCEW

MAKEINTRESOURCE可以处理WORD(16bit),也就是0x10000,按道理0x8000没问题。
是不是别的报错?你将图改成0x7FFF,是否可用呢?
点赞  2009-8-12 11:23
WINCE上的解释如下:
HBITMAP LoadBitmap(
  HINSTANCE hInstance,
  LPCTSTR lpBitmapName
);
Parameters
hInstance
[in] Handle to the instance of the module for which the executable file contains the bitmap that you want to load.
lpBitmapName
[in] Long pointer to a null-terminated string that contains the name of the bitmap resource that you want to load.
Alternatively, this parameter can consist of the resource identifier in the low-order word and zero in the high-order word.

The MAKEINTRESOURCE macro can be used to create this value.

The maximum value for the resource identifier is 32000.
点赞  2009-8-12 12:28
电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 京公网安备 11010802033920号
    写回复