mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
parent
575ab6c760
commit
f8b90805ff
1 changed files with 52 additions and 26 deletions
|
@ -439,6 +439,7 @@ LRESULT APIENTRY OSK_ThemeHandler(HWND hDlg, NMCUSTOMDRAW *pNmDraw)
|
|||
{
|
||||
HTHEME hTheme;
|
||||
HWND hDlgButtonCtrl;
|
||||
LRESULT Ret;
|
||||
INT iState = PBS_NORMAL;
|
||||
|
||||
/* Retrieve the theme handle for the button controls */
|
||||
|
@ -450,6 +451,11 @@ LRESULT APIENTRY OSK_ThemeHandler(HWND hDlg, NMCUSTOMDRAW *pNmDraw)
|
|||
the theme for control buttons of the dialog.
|
||||
*/
|
||||
if (hTheme)
|
||||
{
|
||||
/* Obtain CDDS drawing stages */
|
||||
switch (pNmDraw->dwDrawStage)
|
||||
{
|
||||
case CDDS_PREPAINT:
|
||||
{
|
||||
/*
|
||||
The button could be either in normal state or pushed.
|
||||
|
@ -471,14 +477,34 @@ LRESULT APIENTRY OSK_ThemeHandler(HWND hDlg, NMCUSTOMDRAW *pNmDraw)
|
|||
if (IsThemeBackgroundPartiallyTransparent(hTheme, BP_PUSHBUTTON, iState))
|
||||
{
|
||||
/* Draw the application if the theme is transparent */
|
||||
DrawThemeParentBackground(hDlg, pNmDraw->hdc, &pNmDraw->rc);
|
||||
DrawThemeParentBackground(hDlgButtonCtrl, pNmDraw->hdc, &pNmDraw->rc);
|
||||
}
|
||||
|
||||
/* Draw it */
|
||||
DrawThemeBackground(hTheme, pNmDraw->hdc, BP_PUSHBUTTON, iState, &pNmDraw->rc, NULL);
|
||||
|
||||
Ret = CDRF_SKIPDEFAULT;
|
||||
break;
|
||||
}
|
||||
|
||||
return CDRF_SKIPDEFAULT;
|
||||
case CDDS_PREERASE:
|
||||
{
|
||||
Ret = CDRF_DODEFAULT;
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
Ret = CDRF_SKIPDEFAULT;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* hTheme is NULL so bail right away */
|
||||
Ret = CDRF_DODEFAULT;
|
||||
}
|
||||
|
||||
return Ret;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
|
Loading…
Reference in a new issue