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
88870884
Commit
88870884
authored
Jun 20, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 20, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Move default WM_CTL* window message implementation from user32.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
parent
c7e0697e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
12 deletions
+44
-12
defwnd.c
dlls/user32/defwnd.c
+0
-12
defwnd.c
dlls/win32u/defwnd.c
+44
-0
No files found.
dlls/user32/defwnd.c
View file @
88870884
...
...
@@ -161,18 +161,6 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
DEFWND_Print
(
hwnd
,
(
HDC
)
wParam
,
lParam
);
return
0
;
case
WM_CTLCOLORMSGBOX
:
case
WM_CTLCOLOREDIT
:
case
WM_CTLCOLORLISTBOX
:
case
WM_CTLCOLORBTN
:
case
WM_CTLCOLORDLG
:
case
WM_CTLCOLORSTATIC
:
case
WM_CTLCOLORSCROLLBAR
:
return
(
LRESULT
)
DEFWND_ControlColor
(
(
HDC
)
wParam
,
msg
-
WM_CTLCOLORMSGBOX
);
case
WM_CTLCOLOR
:
return
(
LRESULT
)
DEFWND_ControlColor
(
(
HDC
)
wParam
,
HIWORD
(
lParam
)
);
case
WM_SYSCOMMAND
:
return
NC_HandleSysCommand
(
hwnd
,
wParam
,
lParam
);
...
...
dlls/win32u/defwnd.c
View file @
88870884
...
...
@@ -2261,6 +2261,38 @@ static LRESULT handle_nc_button_dbl_click( HWND hwnd, WPARAM wparam, LPARAM lpar
return
0
;
}
static
HBRUSH
handle_control_color
(
HDC
hdc
,
UINT
type
)
{
if
(
type
==
CTLCOLOR_SCROLLBAR
)
{
HBRUSH
hb
=
get_sys_color_brush
(
COLOR_SCROLLBAR
);
COLORREF
bk
=
get_sys_color
(
COLOR_3DHILIGHT
);
NtGdiGetAndSetDCDword
(
hdc
,
NtGdiSetTextColor
,
get_sys_color
(
COLOR_3DFACE
),
NULL
);
NtGdiGetAndSetDCDword
(
hdc
,
NtGdiSetBkColor
,
bk
,
NULL
);
/* if COLOR_WINDOW happens to be the same as COLOR_3DHILIGHT
* we better use 0x55aa bitmap brush to make scrollbar's background
* look different from the window background.
*/
if
(
bk
==
get_sys_color
(
COLOR_WINDOW
))
return
get_55aa_brush
();
NtGdiUnrealizeObject
(
hb
);
return
hb
;
}
NtGdiGetAndSetDCDword
(
hdc
,
NtGdiSetTextColor
,
get_sys_color
(
COLOR_WINDOWTEXT
),
NULL
);
if
(
type
==
CTLCOLOR_EDIT
||
type
==
CTLCOLOR_LISTBOX
)
NtGdiGetAndSetDCDword
(
hdc
,
NtGdiSetBkColor
,
get_sys_color
(
COLOR_WINDOW
),
NULL
);
else
{
NtGdiGetAndSetDCDword
(
hdc
,
NtGdiSetBkColor
,
get_sys_color
(
COLOR_3DFACE
),
NULL
);
return
get_sys_color_brush
(
COLOR_3DFACE
);
}
return
get_sys_color_brush
(
COLOR_WINDOW
);
}
LRESULT
default_window_proc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
,
BOOL
ansi
)
{
LRESULT
result
=
0
;
...
...
@@ -2474,6 +2506,18 @@ LRESULT default_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam,
handle_set_cursor
(
hwnd
,
wparam
,
lparam
);
break
;
case
WM_CTLCOLORMSGBOX
:
case
WM_CTLCOLOREDIT
:
case
WM_CTLCOLORLISTBOX
:
case
WM_CTLCOLORBTN
:
case
WM_CTLCOLORDLG
:
case
WM_CTLCOLORSTATIC
:
case
WM_CTLCOLORSCROLLBAR
:
return
(
LRESULT
)
handle_control_color
(
(
HDC
)
wparam
,
msg
-
WM_CTLCOLORMSGBOX
);
case
WM_CTLCOLOR
:
return
(
LRESULT
)
handle_control_color
(
(
HDC
)
wparam
,
HIWORD
(
lparam
));
case
WM_SYSCOMMAND
:
result
=
handle_sys_command
(
hwnd
,
wparam
,
lparam
);
break
;
...
...
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