[user32]
[reactos.git] / reactos / dll / win32 / user32 / windows / bitmap.c
index 17ff0d8..41486c5 100644 (file)
@@ -56,8 +56,8 @@ typedef struct
 
 #include "poppack.h"
 
-/* forward declerations... actually in user32\windows\icon.c but usful here */
-HICON ICON_CreateIconFromData(HDC hDC, PVOID ImageData, ICONIMAGE* IconImage, int cxDesired, int cyDesired, int xHotspot, int yHotspot);
+/* forward declarations... actually in user32\windows\icon.c but useful here */
+HICON CreateCursorIconFromData(HDC hDC, PVOID ImageData, ICONIMAGE* IconImage, int cxDesired, int cyDesired, int xHotspot, int yHotspot, BOOL fIcon);
 CURSORICONDIRENTRY *CURSORICON_FindBestIcon( CURSORICONDIR *dir, int width, int height, int colors);
 CURSORICONDIRENTRY *CURSORICON_FindBestCursor( CURSORICONDIR *dir, int width, int height, int colors);
 
@@ -265,7 +265,7 @@ LoadCursorIconImage(
       hIcon = CreateIconFromResourceEx((PBYTE)ResIcon,
                                        SizeofResource(hinst, hResInfo),
                                        Icon, 0x00030000, width, height,
-                                       fuLoad & (LR_DEFAULTCOLOR | LR_MONOCHROME));
+                                       (fuLoad & (LR_DEFAULTSIZE | LR_SHARED)) | LR_DEFAULTCOLOR);
 
       if (hIcon && 0 != (fuLoad & LR_SHARED))
       {
@@ -328,12 +328,6 @@ LoadCursorIconImage(
    else
    {
       ColorBits = GetDeviceCaps(hScreenDc, BITSPIXEL);
-      /*
-       * FIXME:
-       * Remove this after proper support for alpha icons will be finished.
-       */
-      if (ColorBits > 8)
-         ColorBits = 8;
    }
 
    /* Pick the best size. */
@@ -390,7 +384,7 @@ LoadCursorIconImage(
    /* Make data point to the start of the XOR image data. */
    Data = (PBYTE)SafeIconImage + HeaderSize;
 
-   hIcon = ICON_CreateIconFromData(hScreenDc, Data, SafeIconImage, width, height, width/2, height/2);
+   hIcon = CreateCursorIconFromData(hScreenDc, Data, SafeIconImage, width, height, width/2, height/2, Icon);
    RtlFreeHeap(GetProcessHeap(), 0, SafeIconImage);
    DeleteDC(hScreenDc);