mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 20:25:39 +00:00
replace NtGdiSelectObject with NtGdiSelectBitmap, NtGdiSelectBrush and NtGdiSelectFont in painting.c
svn path=/trunk/; revision=30925
This commit is contained in:
parent
6b97efb7ed
commit
4bb2dd0e07
1 changed files with 13 additions and 13 deletions
|
@ -1594,10 +1594,10 @@ UserDrawCaptionText(HDC hDc,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
hOldFont = NtGdiSelectObject(hDc, hFont);
|
hOldFont = NtGdiSelectFont(hDc, hFont);
|
||||||
if(!hOldFont)
|
if(!hOldFont)
|
||||||
{
|
{
|
||||||
DPRINT1("%s: SelectObject() failed!\n", __FUNCTION__);
|
DPRINT1("%s: SelectFont() failed!\n", __FUNCTION__);
|
||||||
NtGdiDeleteObject(hFont);
|
NtGdiDeleteObject(hFont);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -1614,7 +1614,7 @@ UserDrawCaptionText(HDC hDc,
|
||||||
Text->Length/sizeof(WCHAR), NULL);
|
Text->Length/sizeof(WCHAR), NULL);
|
||||||
|
|
||||||
NtGdiSetTextColor(hDc, OldTextColor);
|
NtGdiSetTextColor(hDc, OldTextColor);
|
||||||
NtGdiSelectObject(hDc, hOldFont);
|
NtGdiSelectFont(hDc, hOldFont);
|
||||||
NtGdiDeleteObject(hFont);
|
NtGdiDeleteObject(hFont);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -1662,10 +1662,10 @@ BOOL UserDrawCaption(
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
hOldBmp = NtGdiSelectObject(hMemDc, hMemBmp);
|
hOldBmp = NtGdiSelectBitmap(hMemDc, hMemBmp);
|
||||||
if(!hOldBmp)
|
if(!hOldBmp)
|
||||||
{
|
{
|
||||||
DPRINT1("%s: NtGdiSelectObject() failed!\n", __FUNCTION__);
|
DPRINT1("%s: NtGdiSelectBitmap() failed!\n", __FUNCTION__);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1692,13 +1692,13 @@ BOOL UserDrawCaption(
|
||||||
// Draw the caption background
|
// Draw the caption background
|
||||||
if(uFlags & DC_INBUTTON)
|
if(uFlags & DC_INBUTTON)
|
||||||
{
|
{
|
||||||
hOldBrush = NtGdiSelectObject(hMemDc,
|
hOldBrush = NtGdiSelectBrush(hMemDc,
|
||||||
IntGetSysColorBrush(uFlags & DC_ACTIVE ?
|
IntGetSysColorBrush(uFlags & DC_ACTIVE ?
|
||||||
COLOR_BTNFACE : COLOR_BTNSHADOW));
|
COLOR_BTNFACE : COLOR_BTNSHADOW));
|
||||||
|
|
||||||
if(!hOldBrush)
|
if(!hOldBrush)
|
||||||
{
|
{
|
||||||
DPRINT1("%s: NtGdiSelectObject() failed!\n", __FUNCTION__);
|
DPRINT1("%s: NtGdiSelectBrush() failed!\n", __FUNCTION__);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1720,13 +1720,13 @@ BOOL UserDrawCaption(
|
||||||
ButtonWidth = UserGetSystemMetrics(SM_CXSMSIZE) - 2;
|
ButtonWidth = UserGetSystemMetrics(SM_CXSMSIZE) - 2;
|
||||||
else ButtonWidth = UserGetSystemMetrics(SM_CXSIZE) - 2;
|
else ButtonWidth = UserGetSystemMetrics(SM_CXSIZE) - 2;
|
||||||
|
|
||||||
hOldBrush = NtGdiSelectObject(hMemDc,
|
hOldBrush = NtGdiSelectBrush(hMemDc,
|
||||||
IntGetSysColorBrush(uFlags & DC_ACTIVE ?
|
IntGetSysColorBrush(uFlags & DC_ACTIVE ?
|
||||||
COLOR_ACTIVECAPTION : COLOR_INACTIVECAPTION));
|
COLOR_ACTIVECAPTION : COLOR_INACTIVECAPTION));
|
||||||
|
|
||||||
if(!hOldBrush)
|
if(!hOldBrush)
|
||||||
{
|
{
|
||||||
DPRINT1("%s: NtGdiSelectObject() failed!\n", __FUNCTION__);
|
DPRINT1("%s: NtGdiSelectBrush() failed!\n", __FUNCTION__);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1767,11 +1767,11 @@ BOOL UserDrawCaption(
|
||||||
}
|
}
|
||||||
|
|
||||||
//Draw buttons background
|
//Draw buttons background
|
||||||
if(!NtGdiSelectObject(hMemDc,
|
if(!NtGdiSelectBrush(hMemDc,
|
||||||
IntGetSysColorBrush(uFlags & DC_ACTIVE ?
|
IntGetSysColorBrush(uFlags & DC_ACTIVE ?
|
||||||
COLOR_GRADIENTACTIVECAPTION:COLOR_GRADIENTINACTIVECAPTION)))
|
COLOR_GRADIENTACTIVECAPTION:COLOR_GRADIENTINACTIVECAPTION)))
|
||||||
{
|
{
|
||||||
DPRINT1("%s: NtGdiSelectObject() failed!\n", __FUNCTION__);
|
DPRINT1("%s: NtGdiSelectBrush() failed!\n", __FUNCTION__);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1878,8 +1878,8 @@ BOOL UserDrawCaption(
|
||||||
Ret = TRUE;
|
Ret = TRUE;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (hOldBrush) NtGdiSelectObject(hMemDc, hOldBrush);
|
if (hOldBrush) NtGdiSelectBrush(hMemDc, hOldBrush);
|
||||||
if (hOldBmp) NtGdiSelectObject(hMemDc, hOldBmp);
|
if (hOldBmp) NtGdiSelectBitmap(hMemDc, hOldBmp);
|
||||||
if (hMemBmp) NtGdiDeleteObject(hMemBmp);
|
if (hMemBmp) NtGdiDeleteObject(hMemBmp);
|
||||||
if (hMemDc) NtGdiDeleteObjectApp(hMemDc);
|
if (hMemDc) NtGdiDeleteObjectApp(hMemDc);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue