Use IC instead of DC when possible

svn path=/trunk/; revision=13871
This commit is contained in:
Gé van Geldorp 2005-03-07 22:25:39 +00:00
parent 49bf05dfb5
commit 907b461720
2 changed files with 3 additions and 3 deletions

View file

@ -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);

View file

@ -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 );