Use IC instead of DC when possible
Modified: trunk/reactos/lib/user32/windows/bitmap.c
Modified: trunk/reactos/lib/user32/windows/icon.c
_____
Modified: trunk/reactos/lib/user32/windows/bitmap.c
--- trunk/reactos/lib/user32/windows/bitmap.c 2005-03-07 22:24:33 UTC
(rev 13870)
+++ trunk/reactos/lib/user32/windows/bitmap.c 2005-03-07 22:25:39 UTC
(rev 13871)
@@ -552,7 +552,7 @@
/* FIXME: Handle color conversion and transparency. */
- hScreenDc = CreateDCW(L"DISPLAY", NULL, NULL, NULL);
+ hScreenDc = CreateCompatibleDC(NULL);
if (hScreenDc == NULL)
{
RtlFreeHeap(GetProcessHeap(), 0, PrivateInfo);
_____
Modified: trunk/reactos/lib/user32/windows/icon.c
--- trunk/reactos/lib/user32/windows/icon.c 2005-03-07 22:24:33 UTC
(rev 13870)
+++ trunk/reactos/lib/user32/windows/icon.c 2005-03-07 22:25:39 UTC
(rev 13871)
@@ -566,7 +566,7 @@
HDC hdc;
int ColorBits;
- hdc = GetDC(0);
+ hdc = CreateICW(NULL, NULL, NULL, NULL);
if (Flags & LR_MONOCHROME)
{
ColorBits = 1;
@@ -577,7 +577,7 @@
if (ColorBits > 8)
ColorBits = 8;
}
- ReleaseDC(0, hdc);
+ DeleteDC(hdc);
entry = CURSORICON_FindBestIcon( dir, cxDesired, cyDesired,
ColorBits );