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
d2c9a5cf
Commit
d2c9a5cf
authored
Jun 27, 2011
by
Piotr Caban
Committed by
Alexandre Julliard
Jun 27, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Improved setting button state.
parent
f831f775
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
theme_button.c
dlls/comctl32/theme_button.c
+15
-7
No files found.
dlls/comctl32/theme_button.c
View file @
d2c9a5cf
...
@@ -246,18 +246,26 @@ static BOOL BUTTON_Paint(HTHEME theme, HWND hwnd, HDC hParamDC)
...
@@ -246,18 +246,26 @@ static BOOL BUTTON_Paint(HTHEME theme, HWND hwnd, HDC hParamDC)
DWORD
dwStyle
=
GetWindowLongW
(
hwnd
,
GWL_STYLE
);
DWORD
dwStyle
=
GetWindowLongW
(
hwnd
,
GWL_STYLE
);
DWORD
dwStyleEx
=
GetWindowLongW
(
hwnd
,
GWL_EXSTYLE
);
DWORD
dwStyleEx
=
GetWindowLongW
(
hwnd
,
GWL_EXSTYLE
);
UINT
dtFlags
=
get_drawtext_flags
(
dwStyle
,
dwStyleEx
);
UINT
dtFlags
=
get_drawtext_flags
(
dwStyle
,
dwStyleEx
);
ButtonState
drawState
=
IsWindowEnabled
(
hwnd
)
?
STATE_NORMAL
:
STATE_DISABLED
;
int
state
=
(
int
)
SendMessageW
(
hwnd
,
BM_GETSTATE
,
0
,
0
);
ButtonState
drawState
;
pfThemedPaint
paint
=
btnThemedPaintFunc
[
dwStyle
&
BUTTON_TYPE
];
pfThemedPaint
paint
=
btnThemedPaintFunc
[
dwStyle
&
BUTTON_TYPE
];
if
(
paint
)
if
(
!
paint
)
return
FALSE
;
if
(
IsWindowEnabled
(
hwnd
))
{
{
hDC
=
hParamDC
?
hParamDC
:
BeginPaint
(
hwnd
,
&
ps
)
;
if
(
state
&
BST_PUSHED
)
drawState
=
STATE_PRESSED
;
paint
(
theme
,
hwnd
,
hDC
,
drawState
,
dtFlags
)
;
else
if
(
state
&
BST_HOT
)
drawState
=
STATE_HOT
;
if
(
!
hParamDC
)
EndPaint
(
hwnd
,
&
ps
)
;
else
if
(
state
&
BST_FOCUS
)
drawState
=
STATE_DEFAULTED
;
return
TRUE
;
else
drawState
=
STATE_NORMAL
;
}
}
else
drawState
=
STATE_DISABLED
;
return
FALSE
;
/* Delegate drawing to the non-themed code. */
hDC
=
hParamDC
?
hParamDC
:
BeginPaint
(
hwnd
,
&
ps
);
paint
(
theme
,
hwnd
,
hDC
,
drawState
,
dtFlags
);
if
(
!
hParamDC
)
EndPaint
(
hwnd
,
&
ps
);
return
TRUE
;
}
}
/**********************************************************************
/**********************************************************************
...
...
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