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
68775d91
Commit
68775d91
authored
Dec 11, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Split the handling of the 16-bit messages out of the button winproc.
parent
68656c0c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
10 deletions
+22
-10
button.c
dlls/user32/button.c
+22
-10
No files found.
dlls/user32/button.c
View file @
68775d91
...
...
@@ -461,7 +461,6 @@ static LRESULT ButtonWndProc_common(HWND hWnd, UINT uMsg,
InvalidateRect
(
hWnd
,
NULL
,
FALSE
);
break
;
case
BM_SETSTYLE16
:
case
BM_SETSTYLE
:
if
((
wParam
&
0x0f
)
>=
MAX_BTN_TYPE
)
break
;
btn_type
=
wParam
&
0x0f
;
...
...
@@ -499,11 +498,9 @@ static LRESULT ButtonWndProc_common(HWND hWnd, UINT uMsg,
case
BM_GETIMAGE
:
return
GetWindowLongPtrW
(
hWnd
,
HIMAGE_GWL_OFFSET
);
case
BM_GETCHECK16
:
case
BM_GETCHECK
:
return
get_button_state
(
hWnd
)
&
3
;
case
BM_SETCHECK16
:
case
BM_SETCHECK
:
if
(
wParam
>
maxCheckState
[
btn_type
])
wParam
=
maxCheckState
[
btn_type
];
state
=
get_button_state
(
hWnd
);
...
...
@@ -522,11 +519,9 @@ static LRESULT ButtonWndProc_common(HWND hWnd, UINT uMsg,
BUTTON_CheckAutoRadioButton
(
hWnd
);
break
;
case
BM_GETSTATE16
:
case
BM_GETSTATE
:
return
get_button_state
(
hWnd
);
case
BM_SETSTATE16
:
case
BM_SETSTATE
:
state
=
get_button_state
(
hWnd
);
if
(
wParam
)
...
...
@@ -553,15 +548,32 @@ static LRESULT ButtonWndProc_common(HWND hWnd, UINT uMsg,
}
/***********************************************************************
* ButtonWndProc_wrapper16
*/
static
LRESULT
ButtonWndProc_wrapper16
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
,
BOOL
unicode
)
{
static
const
UINT
msg16_offset
=
BM_GETCHECK16
-
BM_GETCHECK
;
switch
(
msg
)
{
case
BM_GETCHECK16
:
case
BM_SETCHECK16
:
case
BM_GETSTATE16
:
case
BM_SETSTATE16
:
case
BM_SETSTYLE16
:
return
ButtonWndProc_common
(
hwnd
,
msg
-
msg16_offset
,
wParam
,
lParam
,
FALSE
);
default:
return
ButtonWndProc_common
(
hwnd
,
msg
,
wParam
,
lParam
,
unicode
);
}
}
/***********************************************************************
* ButtonWndProcW
* The button window procedure. This is just a wrapper which locks
* the passed HWND and calls the real window procedure (with a WND*
* pointer pointing to the locked windowstructure).
*/
static
LRESULT
WINAPI
ButtonWndProcW
(
HWND
hWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
if
(
!
IsWindow
(
hWnd
))
return
0
;
return
ButtonWndProc_
common
(
hWnd
,
uMsg
,
wParam
,
lParam
,
TRUE
);
return
ButtonWndProc_
wrapper16
(
hWnd
,
uMsg
,
wParam
,
lParam
,
TRUE
);
}
...
...
@@ -571,7 +583,7 @@ static LRESULT WINAPI ButtonWndProcW( HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
static
LRESULT
WINAPI
ButtonWndProcA
(
HWND
hWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
if
(
!
IsWindow
(
hWnd
))
return
0
;
return
ButtonWndProc_
common
(
hWnd
,
uMsg
,
wParam
,
lParam
,
FALSE
);
return
ButtonWndProc_
wrapper16
(
hWnd
,
uMsg
,
wParam
,
lParam
,
FALSE
);
}
...
...
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