mirror of
https://github.com/reactos/reactos.git
synced 2024-12-31 19:42:51 +00:00
[UXTHEME] Properly show disabled close button
CORE-17203
This commit is contained in:
parent
2fb2f1e4c5
commit
685084b63c
1 changed files with 9 additions and 0 deletions
|
@ -277,6 +277,8 @@ ThemeDrawCaptionButton(PDRAW_CONTEXT pcontext,
|
||||||
INT iStateId)
|
INT iStateId)
|
||||||
{
|
{
|
||||||
INT iPartId;
|
INT iPartId;
|
||||||
|
HMENU SysMenu;
|
||||||
|
UINT MenuState;
|
||||||
PWND_DATA pwndData = ThemeGetWndData(pcontext->hWnd);
|
PWND_DATA pwndData = ThemeGetWndData(pcontext->hWnd);
|
||||||
if (!pwndData)
|
if (!pwndData)
|
||||||
return;
|
return;
|
||||||
|
@ -284,6 +286,13 @@ ThemeDrawCaptionButton(PDRAW_CONTEXT pcontext,
|
||||||
switch(buttonId)
|
switch(buttonId)
|
||||||
{
|
{
|
||||||
case CLOSEBUTTON:
|
case CLOSEBUTTON:
|
||||||
|
SysMenu = GetSystemMenu(pcontext->hWnd, FALSE);
|
||||||
|
MenuState = GetMenuState(SysMenu, SC_CLOSE, MF_BYCOMMAND);
|
||||||
|
if (!(pcontext->wi.dwStyle & WS_SYSMENU) || (MenuState & (MF_GRAYED | MF_DISABLED)) || pcontext->wi.dwStyle & CS_NOCLOSE)
|
||||||
|
{
|
||||||
|
iStateId = (pcontext->Active ? BUTTON_DISABLED : BUTTON_INACTIVE_DISABLED);
|
||||||
|
}
|
||||||
|
|
||||||
iPartId = pcontext->wi.dwExStyle & WS_EX_TOOLWINDOW ? WP_SMALLCLOSEBUTTON : WP_CLOSEBUTTON;
|
iPartId = pcontext->wi.dwExStyle & WS_EX_TOOLWINDOW ? WP_SMALLCLOSEBUTTON : WP_CLOSEBUTTON;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue