Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
e7d22dc9
Commit
e7d22dc9
authored
Jul 15, 2008
by
Reece Dunn
Committed by
Alexandre Julliard
Jul 24, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Made the button theme drawing code extensible.
parent
2a317603
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
4 deletions
+27
-4
theme_button.c
dlls/comctl32/theme_button.c
+27
-4
No files found.
dlls/comctl32/theme_button.c
View file @
e7d22dc9
...
...
@@ -36,6 +36,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(themingbutton);
#define BUTTON_TYPE 0x0f
/* bit mask for the available button types */
typedef
void
(
*
pfThemedPaint
)(
HTHEME
theme
,
HWND
hwnd
,
HDC
hdc
);
static
void
GB_draw
(
HTHEME
theme
,
HWND
hwnd
,
HDC
hDC
)
{
RECT
bgRect
,
textRect
;
...
...
@@ -71,21 +73,42 @@ static void GB_draw(HTHEME theme, HWND hwnd, HDC hDC)
if
(
hPrevFont
)
SelectObject
(
hDC
,
hPrevFont
);
}
static
const
pfThemedPaint
btnThemedPaintFunc
[
BUTTON_TYPE
+
1
]
=
{
NULL
,
/* BS_PUSHBUTTON */
NULL
,
/* BS_DEFPUSHBUTTON */
NULL
,
/* BS_CHECKBOX */
NULL
,
/* BS_AUTOCHECKBOX */
NULL
,
/* BS_RADIOBUTTON */
NULL
,
/* BS_3STATE */
NULL
,
/* BS_AUTO3STATE */
GB_draw
,
/* BS_GROUPBOX */
NULL
,
/* BS_USERBUTTON */
NULL
,
/* BS_AUTORADIOBUTTON */
NULL
,
/* Not defined */
NULL
,
/* BS_OWNERDRAW */
NULL
,
/* Not defined */
NULL
,
/* Not defined */
NULL
,
/* Not defined */
NULL
,
/* Not defined */
};
static
BOOL
BUTTON_Paint
(
HTHEME
theme
,
HWND
hwnd
,
HDC
hParamDC
)
{
PAINTSTRUCT
ps
;
HDC
hDC
;
DWORD
dwStyle
=
GetWindowLongW
(
hwnd
,
GWL_STYLE
);
pfThemedPaint
paint
=
btnThemedPaintFunc
[
dwStyle
&
BUTTON_TYPE
];
if
(
(
dwStyle
&
BUTTON_TYPE
)
==
BS_GROUPBOX
)
if
(
paint
)
{
hDC
=
hParamDC
?
hParamDC
:
BeginPaint
(
hwnd
,
&
ps
);
GB_draw
(
theme
,
hwnd
,
hDC
);
paint
(
theme
,
hwnd
,
hDC
);
if
(
!
hParamDC
)
EndPaint
(
hwnd
,
&
ps
);
return
TRUE
;
}
else
return
FALSE
;
/* Delegate drawing to the non-themed code. */
return
TRUE
;
return
FALSE
;
/* Delegate drawing to the non-themed code. */
}
/**********************************************************************
...
...
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