bitmap = (HBITMAP)LoadBitmap(m_hRes,MAKEINTRESOURCE(0x8000));
失败了....
#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,是否可用呢?
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.