Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
736ae290
Commit
736ae290
authored
Oct 23, 2022
by
Zhiyi Zhang
Committed by
Alexandre Julliard
Nov 04, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uxtheme: Support drawing themed menu buttons.
parent
c196d246
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
1 deletion
+60
-1
window.c
dlls/uxtheme/window.c
+60
-1
No files found.
dlls/uxtheme/window.c
View file @
736ae290
...
...
@@ -22,11 +22,70 @@
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "uxthemedll.h"
#include "vssym32.h"
static
void
uxtheme_draw_menu_button
(
HTHEME
theme
,
HWND
hwnd
,
HDC
hdc
,
enum
NONCLIENT_BUTTON_TYPE
type
,
RECT
rect
,
BOOL
down
,
BOOL
grayed
)
{
int
part
,
state
;
switch
(
type
)
{
case
MENU_CLOSE_BUTTON
:
part
=
WP_MDICLOSEBUTTON
;
break
;
case
MENU_MIN_BUTTON
:
part
=
WP_MDIMINBUTTON
;
break
;
case
MENU_RESTORE_BUTTON
:
part
=
WP_MDIRESTOREBUTTON
;
break
;
case
MENU_HELP_BUTTON
:
part
=
WP_MDIHELPBUTTON
;
break
;
/* There is no WP_MDIMAXBUTTON */
default:
user_api
.
pNonClientButtonDraw
(
hwnd
,
hdc
,
type
,
rect
,
down
,
grayed
);
return
;
}
if
(
grayed
)
state
=
MINBS_DISABLED
;
else
if
(
down
)
state
=
MINBS_PUSHED
;
else
state
=
MINBS_NORMAL
;
if
(
IsThemeBackgroundPartiallyTransparent
(
theme
,
part
,
state
))
DrawThemeParentBackground
(
hwnd
,
hdc
,
&
rect
);
DrawThemeBackground
(
theme
,
hdc
,
part
,
state
,
&
rect
,
NULL
);
}
void
WINAPI
UXTHEME_NonClientButtonDraw
(
HWND
hwnd
,
HDC
hdc
,
enum
NONCLIENT_BUTTON_TYPE
type
,
RECT
rect
,
BOOL
down
,
BOOL
grayed
)
{
user_api
.
pNonClientButtonDraw
(
hwnd
,
hdc
,
type
,
rect
,
down
,
grayed
);
HTHEME
theme
;
theme
=
OpenThemeDataForDpi
(
NULL
,
L"Window"
,
GetDpiForWindow
(
hwnd
));
if
(
!
theme
)
{
user_api
.
pNonClientButtonDraw
(
hwnd
,
hdc
,
type
,
rect
,
down
,
grayed
);
return
;
}
switch
(
type
)
{
case
MENU_CLOSE_BUTTON
:
case
MENU_MIN_BUTTON
:
case
MENU_MAX_BUTTON
:
case
MENU_RESTORE_BUTTON
:
case
MENU_HELP_BUTTON
:
uxtheme_draw_menu_button
(
theme
,
hwnd
,
hdc
,
type
,
rect
,
down
,
grayed
);
break
;
}
CloseThemeData
(
theme
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment