mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
Use IC instead of DC when possible
svn path=/trunk/; revision=13871
This commit is contained in:
parent
49bf05dfb5
commit
907b461720
2 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
|
|
|
@ -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 );
|
||||
|
||||
|
|
Loading…
Reference in a new issue