mirror of
https://github.com/reactos/reactos.git
synced 2024-07-21 11:48:04 +00:00
Use IC instead of DC when possible
svn path=/trunk/; revision=13871
This commit is contained in:
parent
49bf05dfb5
commit
907b461720
|
@ -552,7 +552,7 @@ LoadBitmapImage(HINSTANCE hInstance, LPCWSTR lpszName, UINT fuLoad)
|
||||||
|
|
||||||
/* FIXME: Handle color conversion and transparency. */
|
/* FIXME: Handle color conversion and transparency. */
|
||||||
|
|
||||||
hScreenDc = CreateDCW(L"DISPLAY", NULL, NULL, NULL);
|
hScreenDc = CreateCompatibleDC(NULL);
|
||||||
if (hScreenDc == NULL)
|
if (hScreenDc == NULL)
|
||||||
{
|
{
|
||||||
RtlFreeHeap(GetProcessHeap(), 0, PrivateInfo);
|
RtlFreeHeap(GetProcessHeap(), 0, PrivateInfo);
|
||||||
|
|
|
@ -566,7 +566,7 @@ LookupIconIdFromDirectoryEx(
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
int ColorBits;
|
int ColorBits;
|
||||||
|
|
||||||
hdc = GetDC(0);
|
hdc = CreateICW(NULL, NULL, NULL, NULL);
|
||||||
if (Flags & LR_MONOCHROME)
|
if (Flags & LR_MONOCHROME)
|
||||||
{
|
{
|
||||||
ColorBits = 1;
|
ColorBits = 1;
|
||||||
|
@ -577,7 +577,7 @@ LookupIconIdFromDirectoryEx(
|
||||||
if (ColorBits > 8)
|
if (ColorBits > 8)
|
||||||
ColorBits = 8;
|
ColorBits = 8;
|
||||||
}
|
}
|
||||||
ReleaseDC(0, hdc);
|
DeleteDC(hdc);
|
||||||
|
|
||||||
entry = CURSORICON_FindBestIcon( dir, cxDesired, cyDesired, ColorBits );
|
entry = CURSORICON_FindBestIcon( dir, cxDesired, cyDesired, ColorBits );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue