Microsoft Windows CE 3.0 LoadImage uType [in] Specifies the type of image to be loaded. This parameter can be one of the following values: Value Description IMAGE_BITMAP Loads a bitmap. IMAGE_CURSOR Loads a cursor. IMAGE_ICON Loads an icon.
lpszName [in] Identifies the image to load. If the hinst parameter is non-NULL and the fuLoad parameter does not include LR_LOADFROMFILE, lpszName is a pointer to a null-terminated string that contains the name of the image resource in the hinst module. If hinst is NULL and LR_LOADFROMFILE is not specified, the low-order word of this parameter must be the identifier of the OEM image to load. The OEM image identifiers are defined in Winuser.h and have the following prefixes: Prefix Description OBM_ OEM bitmaps OIC_ OEM icons OCR_ OEM cursors If the fuLoad parameter includes the LR_LOADFROMFILE value, lpszName is the name of the file that contains the image.
把uType指定为IMAGE_ICON
WinCE下的LoadImage函数好像不支持LR_LOADFROMFILE,所以这个函数也不能从ico文件载入icon
我想知道有没有别的方法呢
那怎么办,用LoadReource????
uType
[in] Specifies the type of image to be loaded. This parameter can be one of the following values: Value Description
IMAGE_BITMAP Loads a bitmap.
IMAGE_CURSOR Loads a cursor.
IMAGE_ICON Loads an icon.
[in] Identifies the image to load. If the hinst parameter is non-NULL and the fuLoad parameter does not include LR_LOADFROMFILE, lpszName is a pointer to a null-terminated string that contains the name of the image resource in the hinst module.
If hinst is NULL and LR_LOADFROMFILE is not specified, the low-order word of this parameter must be the identifier of the OEM image to load. The OEM image identifiers are defined in Winuser.h and have the following prefixes: Prefix Description
OBM_ OEM bitmaps
OIC_ OEM icons
OCR_ OEM cursors If the fuLoad parameter includes the LR_LOADFROMFILE value, lpszName is the name of the file that contains the image.
--------------------------------------------------------------------------------------
Sorry,说错了,是:用ExtractIcon(HINSTANCE hInst,LPCTSTR lpszExeFileName,UINT nIconIndex)获得HICON,然后用DrawIconEx()把图标在指定的区域画出来。