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
cf9e6b3b
Commit
cf9e6b3b
authored
Jul 28, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 28, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Inline DEFWND_ControlColor implementation.
parent
fa7aaca9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
48 deletions
+21
-48
controls.h
dlls/user32/controls.h
+0
-3
defwnd.c
dlls/user32/defwnd.c
+0
-36
scroll.c
dlls/user32/scroll.c
+21
-9
No files found.
dlls/user32/controls.h
View file @
cf9e6b3b
...
...
@@ -106,9 +106,6 @@ struct tagWND;
extern
ATOM
get_int_atom_value
(
UNICODE_STRING
*
name
)
DECLSPEC_HIDDEN
;
extern
void
register_desktop_class
(
void
)
DECLSPEC_HIDDEN
;
/* defwnd proc */
extern
HBRUSH
DEFWND_ControlColor
(
HDC
hDC
,
UINT
ctlType
)
DECLSPEC_HIDDEN
;
/* desktop */
extern
BOOL
update_wallpaper
(
const
WCHAR
*
wallpaper
,
const
WCHAR
*
pattern
)
DECLSPEC_HIDDEN
;
...
...
dlls/user32/defwnd.c
View file @
cf9e6b3b
...
...
@@ -34,42 +34,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
win
);
/***********************************************************************
* DEFWND_ControlColor
*
* Default colors for control painting.
*/
HBRUSH
DEFWND_ControlColor
(
HDC
hDC
,
UINT
ctlType
)
{
if
(
ctlType
==
CTLCOLOR_SCROLLBAR
)
{
HBRUSH
hb
=
GetSysColorBrush
(
COLOR_SCROLLBAR
);
COLORREF
bk
=
GetSysColor
(
COLOR_3DHILIGHT
);
SetTextColor
(
hDC
,
GetSysColor
(
COLOR_3DFACE
));
SetBkColor
(
hDC
,
bk
);
/* 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
==
GetSysColor
(
COLOR_WINDOW
))
return
SYSCOLOR_Get55AABrush
();
UnrealizeObject
(
hb
);
return
hb
;
}
SetTextColor
(
hDC
,
GetSysColor
(
COLOR_WINDOWTEXT
));
if
((
ctlType
==
CTLCOLOR_EDIT
)
||
(
ctlType
==
CTLCOLOR_LISTBOX
))
SetBkColor
(
hDC
,
GetSysColor
(
COLOR_WINDOW
)
);
else
{
SetBkColor
(
hDC
,
GetSysColor
(
COLOR_3DFACE
)
);
return
GetSysColorBrush
(
COLOR_3DFACE
);
}
return
GetSysColorBrush
(
COLOR_WINDOW
);
}
/***********************************************************************
* DefWindowProcA (USER32.@)
...
...
dlls/user32/scroll.c
View file @
cf9e6b3b
...
...
@@ -97,18 +97,30 @@ static void SCROLL_DrawInterior( HWND hwnd, HDC hdc, INT nBar,
HPEN
hSavePen
;
HBRUSH
hSaveBrush
,
hBrush
;
/* Select the correct brush and pen */
/* Only scrollbar controls send WM_CTLCOLORSCROLLBAR.
* The window-owned scrollbars need to call DEFWND_ControlColor
* to correctly setup default scrollbar colors
*/
if
(
nBar
==
SB_CTL
)
{
if
(
nBar
==
SB_CTL
)
{
hBrush
=
(
HBRUSH
)
SendMessageW
(
GetParent
(
hwnd
),
WM_CTLCOLORSCROLLBAR
,
(
WPARAM
)
hdc
,(
LPARAM
)
hwnd
);
}
else
{
hBrush
=
DEFWND_ControlColor
(
hdc
,
CTLCOLOR_SCROLLBAR
);
}
else
{
COLORREF
bk
=
GetSysColor
(
COLOR_3DHILIGHT
);
SetTextColor
(
hdc
,
GetSysColor
(
COLOR_3DFACE
));
SetBkColor
(
hdc
,
bk
);
/* 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
==
GetSysColor
(
COLOR_WINDOW
))
hBrush
=
SYSCOLOR_Get55AABrush
();
else
{
hBrush
=
GetSysColorBrush
(
COLOR_SCROLLBAR
);
UnrealizeObject
(
hBrush
);
}
}
hSavePen
=
SelectObject
(
hdc
,
SYSCOLOR_GetPen
(
COLOR_WINDOWFRAME
)
);
hSaveBrush
=
SelectObject
(
hdc
,
hBrush
);
...
...
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