diff --git a/reactos/lib/user32/windows/bitmap.c b/reactos/lib/user32/windows/bitmap.c index 26fae34e3ea..b7cff98c64a 100644 --- a/reactos/lib/user32/windows/bitmap.c +++ b/reactos/lib/user32/windows/bitmap.c @@ -552,7 +552,7 @@ LoadBitmapImage(HINSTANCE hInstance, LPCWSTR lpszName, UINT fuLoad) /* FIXME: Handle color conversion and transparency. */ - hScreenDc = CreateDCW(L"DISPLAY", NULL, NULL, NULL); + hScreenDc = CreateCompatibleDC(NULL); if (hScreenDc == NULL) { RtlFreeHeap(GetProcessHeap(), 0, PrivateInfo); diff --git a/reactos/lib/user32/windows/icon.c b/reactos/lib/user32/windows/icon.c index e9c28116d91..a6019e94a05 100644 --- a/reactos/lib/user32/windows/icon.c +++ b/reactos/lib/user32/windows/icon.c @@ -566,7 +566,7 @@ LookupIconIdFromDirectoryEx( HDC hdc; int ColorBits; - hdc = GetDC(0); + hdc = CreateICW(NULL, NULL, NULL, NULL); if (Flags & LR_MONOCHROME) { ColorBits = 1; @@ -577,7 +577,7 @@ LookupIconIdFromDirectoryEx( if (ColorBits > 8) ColorBits = 8; } - ReleaseDC(0, hdc); + DeleteDC(hdc); entry = CURSORICON_FindBestIcon( dir, cxDesired, cyDesired, ColorBits );