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
8649f730
Commit
8649f730
authored
Dec 15, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Turn the static winproc into a Wow handler.
parent
3dc6317f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
22 deletions
+27
-22
controls.h
dlls/user32/controls.h
+3
-0
msg16.c
dlls/user32/msg16.c
+19
-0
static.c
dlls/user32/static.c
+3
-22
winproc.c
dlls/user32/winproc.c
+2
-0
No files found.
dlls/user32/controls.h
View file @
8649f730
...
...
@@ -66,6 +66,7 @@ struct wow_handlers16
LRESULT
(
*
edit_proc
)(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
BOOL
);
LRESULT
(
*
listbox_proc
)(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
BOOL
);
LRESULT
(
*
scrollbar_proc
)(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
BOOL
);
LRESULT
(
*
static_proc
)(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
BOOL
);
};
struct
wow_handlers32
...
...
@@ -75,6 +76,7 @@ struct wow_handlers32
LRESULT
(
*
edit_proc
)(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
BOOL
);
LRESULT
(
*
listbox_proc
)(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
BOOL
);
LRESULT
(
*
scrollbar_proc
)(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
BOOL
);
LRESULT
(
*
static_proc
)(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
BOOL
);
};
extern
struct
wow_handlers16
wow_handlers
DECLSPEC_HIDDEN
;
...
...
@@ -84,6 +86,7 @@ extern LRESULT ComboWndProc_common(HWND,UINT,WPARAM,LPARAM,BOOL) DECLSPEC_HIDDEN
extern
LRESULT
EditWndProc_common
(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
BOOL
)
DECLSPEC_HIDDEN
;
extern
LRESULT
ListBoxWndProc_common
(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
BOOL
)
DECLSPEC_HIDDEN
;
extern
LRESULT
ScrollBarWndProc_common
(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
BOOL
)
DECLSPEC_HIDDEN
;
extern
LRESULT
StaticWndProc_common
(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
BOOL
)
DECLSPEC_HIDDEN
;
extern
void
register_wow_handlers
(
void
)
DECLSPEC_HIDDEN
;
extern
void
WINAPI
UserRegisterWowHandlers
(
const
struct
wow_handlers16
*
new
,
...
...
dlls/user32/msg16.c
View file @
8649f730
...
...
@@ -1191,6 +1191,24 @@ static LRESULT scrollbar_proc16( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
}
/***********************************************************************
* static_proc16
*/
static
LRESULT
static_proc16
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
,
BOOL
unicode
)
{
switch
(
msg
)
{
case
STM_SETICON16
:
wParam
=
(
WPARAM
)
HICON_32
(
(
HICON16
)
wParam
);
return
wow_handlers32
.
static_proc
(
hwnd
,
STM_SETICON
,
wParam
,
lParam
,
FALSE
);
case
STM_GETICON16
:
return
HICON_16
(
wow_handlers32
.
static_proc
(
hwnd
,
STM_GETICON
,
wParam
,
lParam
,
FALSE
));
default:
return
wow_handlers32
.
static_proc
(
hwnd
,
msg
,
wParam
,
lParam
,
unicode
);
}
}
void
register_wow_handlers
(
void
)
{
static
const
struct
wow_handlers16
handlers16
=
...
...
@@ -1200,6 +1218,7 @@ void register_wow_handlers(void)
edit_proc16
,
listbox_proc16
,
scrollbar_proc16
,
static_proc16
,
};
UserRegisterWowHandlers
(
&
handlers16
,
&
wow_handlers32
);
...
...
dlls/user32/static.c
View file @
8649f730
...
...
@@ -47,7 +47,6 @@
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "wine/winuser16.h"
#include "controls.h"
#include "user_private.h"
#include "wine/debug.h"
...
...
@@ -400,8 +399,7 @@ static BOOL hasTextStyle( DWORD style )
/***********************************************************************
* StaticWndProc_common
*/
static
LRESULT
StaticWndProc_common
(
HWND
hwnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
,
BOOL
unicode
)
LRESULT
StaticWndProc_common
(
HWND
hwnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
,
BOOL
unicode
)
{
LRESULT
lResult
=
0
;
LONG
full_style
=
GetWindowLongW
(
hwnd
,
GWL_STYLE
);
...
...
@@ -607,29 +605,12 @@ static LRESULT StaticWndProc_common( HWND hwnd, UINT uMsg, WPARAM wParam,
}
/***********************************************************************
* StaticWndProc_wrapper16
*/
static
LRESULT
StaticWndProc_wrapper16
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
,
BOOL
unicode
)
{
switch
(
msg
)
{
case
STM_SETICON16
:
wParam
=
(
WPARAM
)
HICON_32
(
(
HICON16
)
wParam
);
return
StaticWndProc_common
(
hwnd
,
STM_SETICON
,
wParam
,
lParam
,
FALSE
);
case
STM_GETICON16
:
return
HICON_16
(
StaticWndProc_common
(
hwnd
,
STM_GETICON
,
wParam
,
lParam
,
FALSE
));
default:
return
StaticWndProc_common
(
hwnd
,
msg
,
wParam
,
lParam
,
unicode
);
}
}
/***********************************************************************
* StaticWndProcA
*/
static
LRESULT
WINAPI
StaticWndProcA
(
HWND
hWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
if
(
!
IsWindow
(
hWnd
))
return
0
;
return
StaticWndProc_wrapper16
(
hWnd
,
uMsg
,
wParam
,
lParam
,
FALSE
);
return
wow_handlers
.
static_proc
(
hWnd
,
uMsg
,
wParam
,
lParam
,
FALSE
);
}
/***********************************************************************
...
...
@@ -638,7 +619,7 @@ static LRESULT WINAPI StaticWndProcA( HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
static
LRESULT
WINAPI
StaticWndProcW
(
HWND
hWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
if
(
!
IsWindow
(
hWnd
))
return
0
;
return
StaticWndProc_wrapper16
(
hWnd
,
uMsg
,
wParam
,
lParam
,
TRUE
);
return
wow_handlers
.
static_proc
(
hWnd
,
uMsg
,
wParam
,
lParam
,
TRUE
);
}
static
void
STATIC_PaintOwnerDrawfn
(
HWND
hwnd
,
HDC
hdc
,
DWORD
style
)
...
...
dlls/user32/winproc.c
View file @
8649f730
...
...
@@ -2393,6 +2393,7 @@ void WINAPI UserRegisterWowHandlers( const struct wow_handlers16 *new, struct wo
orig
->
edit_proc
=
EditWndProc_common
;
orig
->
listbox_proc
=
ListBoxWndProc_common
;
orig
->
scrollbar_proc
=
ScrollBarWndProc_common
;
orig
->
static_proc
=
StaticWndProc_common
;
wow_handlers
=
*
new
;
}
...
...
@@ -2404,4 +2405,5 @@ struct wow_handlers16 wow_handlers =
EditWndProc_common
,
ListBoxWndProc_common
,
ScrollBarWndProc_common
,
StaticWndProc_common
,
};
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