mirror of
https://github.com/reactos/reactos.git
synced 2025-07-01 07:01:21 +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;
|
HTHEME hTheme;
|
||||||
HWND hDlgButtonCtrl;
|
HWND hDlgButtonCtrl;
|
||||||
|
LRESULT Ret;
|
||||||
INT iState = PBS_NORMAL;
|
INT iState = PBS_NORMAL;
|
||||||
|
|
||||||
/* Retrieve the theme handle for the button controls */
|
/* 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.
|
the theme for control buttons of the dialog.
|
||||||
*/
|
*/
|
||||||
if (hTheme)
|
if (hTheme)
|
||||||
|
{
|
||||||
|
/* Obtain CDDS drawing stages */
|
||||||
|
switch (pNmDraw->dwDrawStage)
|
||||||
|
{
|
||||||
|
case CDDS_PREPAINT:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
The button could be either in normal state or pushed.
|
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))
|
if (IsThemeBackgroundPartiallyTransparent(hTheme, BP_PUSHBUTTON, iState))
|
||||||
{
|
{
|
||||||
/* Draw the application if the theme is transparent */
|
/* Draw the application if the theme is transparent */
|
||||||
DrawThemeParentBackground(hDlg, pNmDraw->hdc, &pNmDraw->rc);
|
DrawThemeParentBackground(hDlgButtonCtrl, pNmDraw->hdc, &pNmDraw->rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Draw it */
|
/* Draw it */
|
||||||
DrawThemeBackground(hTheme, pNmDraw->hdc, BP_PUSHBUTTON, iState, &pNmDraw->rc, NULL);
|
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…
Add table
Add a link
Reference in a new issue