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
aef6e3d2
Commit
aef6e3d2
authored
Aug 09, 2010
by
André Hentschel
Committed by
Alexandre Julliard
Aug 16, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Use a macro instead of direct values.
parent
dcfdfbaa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
button.c
dlls/user32/button.c
+9
-10
winuser.h
include/winuser.h
+1
-0
No files found.
dlls/user32/button.c
View file @
aef6e3d2
...
...
@@ -31,7 +31,6 @@
* Styles
* - BS_NOTIFY: is it complete?
* - BS_RIGHTBUTTON: same as BS_LEFTTEXT
* - BS_TYPEMASK
*
* Messages
* - WM_CHAR: Checks a (manual or automatic) check box on '+' or '=', clears it on '-' key.
...
...
@@ -191,7 +190,7 @@ static inline void set_button_font( HWND hwnd, HFONT font )
static
inline
UINT
get_button_type
(
LONG
window_style
)
{
return
(
window_style
&
0x0f
);
return
(
window_style
&
BS_TYPEMASK
);
}
/* paint a button of any type */
...
...
@@ -273,8 +272,8 @@ LRESULT ButtonWndProc_common(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
/* XP turns a BS_USERBUTTON into BS_PUSHBUTTON */
if
(
btn_type
==
BS_USERBUTTON
)
{
style
=
(
style
&
~
0x0f
)
|
BS_PUSHBUTTON
;
WIN_SetStyle
(
hWnd
,
style
,
0x0f
&
~
style
);
style
=
(
style
&
~
BS_TYPEMASK
)
|
BS_PUSHBUTTON
;
WIN_SetStyle
(
hWnd
,
style
,
BS_TYPEMASK
&
~
style
);
}
set_button_state
(
hWnd
,
BUTTON_UNCHECKED
);
return
0
;
...
...
@@ -459,10 +458,10 @@ LRESULT ButtonWndProc_common(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
break
;
case
BM_SETSTYLE
:
if
((
wParam
&
0x0f
)
>=
MAX_BTN_TYPE
)
break
;
btn_type
=
wParam
&
0x0f
;
style
=
(
style
&
~
0x0f
)
|
btn_type
;
WIN_SetStyle
(
hWnd
,
style
,
0x0f
&
~
style
);
if
((
wParam
&
BS_TYPEMASK
)
>=
MAX_BTN_TYPE
)
break
;
btn_type
=
wParam
&
BS_TYPEMASK
;
style
=
(
style
&
~
BS_TYPEMASK
)
|
btn_type
;
WIN_SetStyle
(
hWnd
,
style
,
BS_TYPEMASK
&
~
style
);
/* Only redraw if lParam flag is set.*/
if
(
lParam
)
...
...
@@ -547,7 +546,7 @@ static UINT BUTTON_BStoDT( DWORD style, DWORD ex_style )
/* "Convert" pushlike buttons to pushbuttons */
if
(
style
&
BS_PUSHLIKE
)
style
&=
~
0x0F
;
style
&=
~
BS_TYPEMASK
;
if
(
!
(
style
&
BS_MULTILINE
))
dtStyle
|=
DT_SINGLELINE
;
...
...
@@ -988,7 +987,7 @@ static void BUTTON_CheckAutoRadioButton( HWND hwnd )
{
if
(
!
sibling
)
break
;
if
((
hwnd
!=
sibling
)
&&
((
GetWindowLongW
(
sibling
,
GWL_STYLE
)
&
0x0f
)
==
BS_AUTORADIOBUTTON
))
((
GetWindowLongW
(
sibling
,
GWL_STYLE
)
&
BS_TYPEMASK
)
==
BS_AUTORADIOBUTTON
))
SendMessageW
(
sibling
,
BM_SETCHECK
,
BUTTON_UNCHECKED
,
0
);
sibling
=
GetNextDlgGroupItem
(
parent
,
sibling
,
FALSE
);
}
while
(
sibling
!=
start
);
...
...
include/winuser.h
View file @
aef6e3d2
...
...
@@ -711,6 +711,7 @@ typedef struct tagWINDOWPLACEMENT
#define BS_USERBUTTON 0x00000008L
#define BS_AUTORADIOBUTTON 0x00000009L
#define BS_OWNERDRAW 0x0000000BL
#define BS_TYPEMASK 0x0000000FL
#define BS_LEFTTEXT 0x00000020L
#define BS_RIGHTBUTTON BS_LEFTTEXT
...
...
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