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
4344c368
Commit
4344c368
authored
May 20, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Got rid of GetSysColorPen.
parent
11b35c0b
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
84 additions
and
62 deletions
+84
-62
button.c
controls/button.c
+2
-2
combo.c
controls/combo.c
+1
-1
menu.c
controls/menu.c
+5
-5
scroll.c
controls/scroll.c
+2
-2
uitools.c
controls/uitools.c
+22
-22
pager.c
dlls/comctl32/pager.c
+8
-4
status.c
dlls/comctl32/status.c
+10
-4
tab.c
dlls/comctl32/tab.c
+15
-7
toolbar.c
dlls/comctl32/toolbar.c
+11
-4
user32.spec
dlls/user/user32.spec
+0
-1
user.h
include/user.h
+3
-0
winuser.h
include/winuser.h
+0
-1
nonclient.c
windows/nonclient.c
+3
-3
syscolor.c
windows/syscolor.c
+2
-6
No files found.
controls/button.c
View file @
4344c368
...
...
@@ -693,7 +693,7 @@ static void PB_Paint( HWND hwnd, HDC hDC, UINT action )
/* Send WM_CTLCOLOR to allow changing the font (the colors are fixed) */
if
((
hFont
=
get_button_font
(
hwnd
)))
SelectObject
(
hDC
,
hFont
);
SendMessageW
(
GetParent
(
hwnd
),
WM_CTLCOLORBTN
,
hDC
,
(
LPARAM
)
hwnd
);
hOldPen
=
(
HPEN
)
SelectObject
(
hDC
,
GetSysColor
Pen
(
COLOR_WINDOWFRAME
));
hOldPen
=
(
HPEN
)
SelectObject
(
hDC
,
SYSCOLOR_Get
Pen
(
COLOR_WINDOWFRAME
));
hOldBrush
=
(
HBRUSH
)
SelectObject
(
hDC
,
GetSysColorBrush
(
COLOR_BTNFACE
));
oldBkMode
=
SetBkMode
(
hDC
,
TRANSPARENT
);
...
...
@@ -972,7 +972,7 @@ static void GB_Paint( HWND hwnd, HDC hDC, UINT action )
GetClientRect
(
hwnd
,
&
rc
);
if
(
TWEAK_WineLook
==
WIN31_LOOK
)
{
HPEN
hPrevPen
=
SelectObject
(
hDC
,
GetSysColor
Pen
(
COLOR_WINDOWFRAME
));
SYSCOLOR_Get
Pen
(
COLOR_WINDOWFRAME
));
HBRUSH
hPrevBrush
=
SelectObject
(
hDC
,
GetStockObject
(
NULL_BRUSH
)
);
...
...
controls/combo.c
View file @
4344c368
...
...
@@ -1027,7 +1027,7 @@ static LRESULT COMBO_Paint(LPHEADCOMBO lphc, HDC hParamDC)
*/
if
(
TWEAK_WineLook
==
WIN31_LOOK
)
{
HPEN
hPrevPen
=
SelectObject
(
hDC
,
GetSysColor
Pen
(
COLOR_WINDOWFRAME
)
);
HPEN
hPrevPen
=
SelectObject
(
hDC
,
SYSCOLOR_Get
Pen
(
COLOR_WINDOWFRAME
)
);
Rectangle
(
hDC
,
lphc
->
textRect
.
left
,
lphc
->
textRect
.
top
,
...
...
controls/menu.c
View file @
4344c368
...
...
@@ -1218,7 +1218,7 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
}
else
{
SelectObject
(
hdc
,
GetSysColor
Pen
(
COLOR_WINDOWFRAME
)
);
SelectObject
(
hdc
,
SYSCOLOR_Get
Pen
(
COLOR_WINDOWFRAME
)
);
MoveToEx
(
hdc
,
rect
.
left
,
0
,
NULL
);
LineTo
(
hdc
,
rect
.
left
,
height
);
}
...
...
@@ -1237,7 +1237,7 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
}
else
{
SelectObject
(
hdc
,
GetSysColor
Pen
(
COLOR_WINDOWFRAME
)
);
SelectObject
(
hdc
,
SYSCOLOR_Get
Pen
(
COLOR_WINDOWFRAME
)
);
MoveToEx
(
hdc
,
rect
.
left
,
rect
.
top
+
SEPARATOR_HEIGHT
/
2
,
NULL
);
LineTo
(
hdc
,
rect
.
right
,
rect
.
top
+
SEPARATOR_HEIGHT
/
2
);
}
...
...
@@ -1280,7 +1280,7 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
/* helper lines for debugging */
/* FrameRect(hdc, &rect, GetStockObject(BLACK_BRUSH));
SelectObject( hdc,
GetSysColor
Pen(COLOR_WINDOWFRAME) );
SelectObject( hdc,
SYSCOLOR_Get
Pen(COLOR_WINDOWFRAME) );
MoveToEx( hdc, rect.left, (rect.top + rect.bottom)/2, NULL );
LineTo( hdc, rect.right, (rect.top + rect.bottom)/2 );
*/
...
...
@@ -1545,13 +1545,13 @@ UINT MENU_DrawMenuBar( HDC hDC, LPRECT lprect, HWND hwnd,
if
(
TWEAK_WineLook
==
WIN31_LOOK
)
{
SelectObject
(
hDC
,
GetSysColor
Pen
(
COLOR_WINDOWFRAME
)
);
SelectObject
(
hDC
,
SYSCOLOR_Get
Pen
(
COLOR_WINDOWFRAME
)
);
MoveToEx
(
hDC
,
lprect
->
left
,
lprect
->
bottom
,
NULL
);
LineTo
(
hDC
,
lprect
->
right
,
lprect
->
bottom
);
}
else
{
SelectObject
(
hDC
,
GetSysColor
Pen
(
COLOR_3DFACE
));
SelectObject
(
hDC
,
SYSCOLOR_Get
Pen
(
COLOR_3DFACE
));
MoveToEx
(
hDC
,
lprect
->
left
,
lprect
->
bottom
,
NULL
);
LineTo
(
hDC
,
lprect
->
right
,
lprect
->
bottom
);
}
...
...
controls/scroll.c
View file @
4344c368
...
...
@@ -591,7 +591,7 @@ static void SCROLL_DrawInterior_9x( HWND hwnd, HDC hdc, INT nBar,
hBrush
=
DEFWND_ControlColor
(
hdc
,
CTLCOLOR_SCROLLBAR
);
}
hSavePen
=
SelectObject
(
hdc
,
GetSysColor
Pen
(
COLOR_WINDOWFRAME
)
);
hSavePen
=
SelectObject
(
hdc
,
SYSCOLOR_Get
Pen
(
COLOR_WINDOWFRAME
)
);
hSaveBrush
=
SelectObject
(
hdc
,
hBrush
);
/* Calculate the scroll rectangle */
...
...
@@ -692,7 +692,7 @@ static void SCROLL_DrawInterior( HWND hwnd, HDC hdc, INT nBar,
hBrush
=
DEFWND_ControlColor
(
hdc
,
CTLCOLOR_SCROLLBAR
);
}
}
hSavePen
=
SelectObject
(
hdc
,
GetSysColor
Pen
(
COLOR_WINDOWFRAME
)
);
hSavePen
=
SelectObject
(
hdc
,
SYSCOLOR_Get
Pen
(
COLOR_WINDOWFRAME
)
);
hSaveBrush
=
SelectObject
(
hdc
,
hBrush
);
/* Calculate the scroll rectangle */
...
...
controls/uitools.c
View file @
4344c368
...
...
@@ -179,8 +179,8 @@ static BOOL UITOOLS95_DrawDiagEdge(HDC hdc, LPRECT rc,
}
}
if
(
InnerI
!=
-
1
)
InnerPen
=
GetSysColor
Pen
(
InnerI
);
if
(
OuterI
!=
-
1
)
OuterPen
=
GetSysColor
Pen
(
OuterI
);
if
(
InnerI
!=
-
1
)
InnerPen
=
SYSCOLOR_Get
Pen
(
InnerI
);
if
(
OuterI
!=
-
1
)
OuterPen
=
SYSCOLOR_Get
Pen
(
OuterI
);
MoveToEx
(
hdc
,
0
,
0
,
&
SavePoint
);
...
...
@@ -331,7 +331,7 @@ static BOOL UITOOLS95_DrawDiagEdge(HDC hdc, LPRECT rc,
HBRUSH
hb
=
GetSysColorBrush
(
uFlags
&
BF_MONO
?
COLOR_WINDOW
:
COLOR_BTNFACE
);
HPEN
hpsave
;
HPEN
hp
=
GetSysColor
Pen
(
uFlags
&
BF_MONO
?
COLOR_WINDOW
HPEN
hp
=
SYSCOLOR_Get
Pen
(
uFlags
&
BF_MONO
?
COLOR_WINDOW
:
COLOR_BTNFACE
);
hbsave
=
(
HBRUSH
)
SelectObject
(
hdc
,
hb
);
hpsave
=
(
HPEN
)
SelectObject
(
hdc
,
hp
);
...
...
@@ -493,10 +493,10 @@ static BOOL UITOOLS95_DrawRectEdge(HDC hdc, LPRECT rc,
if
((
uFlags
&
BF_BOTTOMRIGHT
)
==
BF_BOTTOMRIGHT
)
RBpenplus
=
1
;
if
((
uFlags
&
BF_TOPLEFT
)
==
BF_TOPLEFT
)
LTpenplus
=
1
;
if
(
LTInnerI
!=
-
1
)
LTInnerPen
=
GetSysColor
Pen
(
LTInnerI
);
if
(
LTOuterI
!=
-
1
)
LTOuterPen
=
GetSysColor
Pen
(
LTOuterI
);
if
(
RBInnerI
!=
-
1
)
RBInnerPen
=
GetSysColor
Pen
(
RBInnerI
);
if
(
RBOuterI
!=
-
1
)
RBOuterPen
=
GetSysColor
Pen
(
RBOuterI
);
if
(
LTInnerI
!=
-
1
)
LTInnerPen
=
SYSCOLOR_Get
Pen
(
LTInnerI
);
if
(
LTOuterI
!=
-
1
)
LTOuterPen
=
SYSCOLOR_Get
Pen
(
LTOuterI
);
if
(
RBInnerI
!=
-
1
)
RBInnerPen
=
SYSCOLOR_Get
Pen
(
RBInnerI
);
if
(
RBOuterI
!=
-
1
)
RBOuterPen
=
SYSCOLOR_Get
Pen
(
RBOuterI
);
MoveToEx
(
hdc
,
0
,
0
,
&
SavePoint
);
...
...
@@ -807,7 +807,7 @@ static BOOL UITOOLS95_DFC_ButtonRadio(HDC dc, LPRECT r, UINT uFlags)
{
if
(
uFlags
&
(
DFCS_FLAT
|
DFCS_MONO
))
{
hpsave
=
(
HPEN
)
SelectObject
(
dc
,
GetSysColor
Pen
(
COLOR_WINDOWFRAME
));
hpsave
=
(
HPEN
)
SelectObject
(
dc
,
SYSCOLOR_Get
Pen
(
COLOR_WINDOWFRAME
));
hbsave
=
(
HBRUSH
)
SelectObject
(
dc
,
GetSysColorBrush
(
COLOR_WINDOWFRAME
));
Ellipse
(
dc
,
myr
.
left
,
myr
.
top
,
myr
.
right
,
myr
.
bottom
);
SelectObject
(
dc
,
hbsave
);
...
...
@@ -815,11 +815,11 @@ static BOOL UITOOLS95_DFC_ButtonRadio(HDC dc, LPRECT r, UINT uFlags)
}
else
{
hpsave
=
(
HPEN
)
SelectObject
(
dc
,
GetSysColor
Pen
(
COLOR_BTNHIGHLIGHT
));
hpsave
=
(
HPEN
)
SelectObject
(
dc
,
SYSCOLOR_Get
Pen
(
COLOR_BTNHIGHLIGHT
));
hbsave
=
(
HBRUSH
)
SelectObject
(
dc
,
GetSysColorBrush
(
COLOR_BTNHIGHLIGHT
));
Pie
(
dc
,
myr
.
left
,
myr
.
top
,
myr
.
right
+
1
,
myr
.
bottom
+
1
,
myr
.
left
-
1
,
myr
.
bottom
,
myr
.
right
+
1
,
myr
.
top
);
SelectObject
(
dc
,
GetSysColor
Pen
(
COLOR_BTNSHADOW
));
SelectObject
(
dc
,
SYSCOLOR_Get
Pen
(
COLOR_BTNSHADOW
));
SelectObject
(
dc
,
GetSysColorBrush
(
COLOR_BTNSHADOW
));
Pie
(
dc
,
myr
.
left
,
myr
.
top
,
myr
.
right
+
1
,
myr
.
bottom
+
1
,
myr
.
right
+
1
,
myr
.
top
,
myr
.
left
-
1
,
myr
.
bottom
);
...
...
@@ -828,11 +828,11 @@ static BOOL UITOOLS95_DFC_ButtonRadio(HDC dc, LPRECT r, UINT uFlags)
myr
.
top
+=
BorderShrink
;
myr
.
bottom
-=
BorderShrink
;
SelectObject
(
dc
,
GetSysColor
Pen
(
COLOR_3DLIGHT
));
SelectObject
(
dc
,
SYSCOLOR_Get
Pen
(
COLOR_3DLIGHT
));
SelectObject
(
dc
,
GetSysColorBrush
(
COLOR_3DLIGHT
));
Pie
(
dc
,
myr
.
left
,
myr
.
top
,
myr
.
right
+
1
,
myr
.
bottom
+
1
,
myr
.
left
-
1
,
myr
.
bottom
,
myr
.
right
+
1
,
myr
.
top
);
SelectObject
(
dc
,
GetSysColor
Pen
(
COLOR_3DDKSHADOW
));
SelectObject
(
dc
,
SYSCOLOR_Get
Pen
(
COLOR_3DDKSHADOW
));
SelectObject
(
dc
,
GetSysColorBrush
(
COLOR_3DDKSHADOW
));
Pie
(
dc
,
myr
.
left
,
myr
.
top
,
myr
.
right
+
1
,
myr
.
bottom
+
1
,
myr
.
right
+
1
,
myr
.
top
,
myr
.
left
-
1
,
myr
.
bottom
);
SelectObject
(
dc
,
hbsave
);
...
...
@@ -845,7 +845,7 @@ static BOOL UITOOLS95_DFC_ButtonRadio(HDC dc, LPRECT r, UINT uFlags)
myr
.
top
=
yc
-
i
+
i
/
2
;
myr
.
bottom
=
yc
+
i
/
2
;
i
=
!
(
uFlags
&
(
DFCS_INACTIVE
|
DFCS_PUSHED
))
?
COLOR_WINDOW
:
COLOR_BTNFACE
;
hpsave
=
(
HPEN
)
SelectObject
(
dc
,
GetSysColor
Pen
(
i
));
hpsave
=
(
HPEN
)
SelectObject
(
dc
,
SYSCOLOR_Get
Pen
(
i
));
hbsave
=
(
HBRUSH
)
SelectObject
(
dc
,
GetSysColorBrush
(
i
));
Ellipse
(
dc
,
myr
.
left
,
myr
.
top
,
myr
.
right
,
myr
.
bottom
);
SelectObject
(
dc
,
hbsave
);
...
...
@@ -863,7 +863,7 @@ static BOOL UITOOLS95_DFC_ButtonRadio(HDC dc, LPRECT r, UINT uFlags)
i
=
uFlags
&
DFCS_INACTIVE
?
COLOR_BTNSHADOW
:
COLOR_WINDOWTEXT
;
hbsave
=
(
HBRUSH
)
SelectObject
(
dc
,
GetSysColorBrush
(
i
));
hpsave
=
(
HPEN
)
SelectObject
(
dc
,
GetSysColor
Pen
(
i
));
hpsave
=
(
HPEN
)
SelectObject
(
dc
,
SYSCOLOR_Get
Pen
(
i
));
Ellipse
(
dc
,
myr
.
left
,
myr
.
top
,
myr
.
right
,
myr
.
bottom
);
SelectObject
(
dc
,
hpsave
);
SelectObject
(
dc
,
hbsave
);
...
...
@@ -965,7 +965,7 @@ static BOOL UITOOLS95_DrawFrameCaption(HDC dc, LPRECT r, UINT uFlags)
INT
height
=
myr
.
bottom
-
myr
.
top
-
6
;
INT
numLines
=
(
width
/
6
)
+
1
;
hpsave
=
(
HPEN
)
SelectObject
(
dc
,
GetSysColor
Pen
(
colorIdx
));
hpsave
=
(
HPEN
)
SelectObject
(
dc
,
SYSCOLOR_Get
Pen
(
colorIdx
));
start
.
x
=
myr
.
left
+
2
;
start
.
y
=
myr
.
top
+
2
;
...
...
@@ -1090,7 +1090,7 @@ static BOOL UITOOLS95_DrawFrameCaption(HDC dc, LPRECT r, UINT uFlags)
{
/* If we have an inactive button, then you see a shadow */
hbsave
=
(
HBRUSH
)
SelectObject
(
dc
,
GetSysColorBrush
(
COLOR_BTNHIGHLIGHT
));
hpsave
=
(
HPEN
)
SelectObject
(
dc
,
GetSysColor
Pen
(
COLOR_BTNHIGHLIGHT
));
hpsave
=
(
HPEN
)
SelectObject
(
dc
,
SYSCOLOR_Get
Pen
(
COLOR_BTNHIGHLIGHT
));
Polygon
(
dc
,
Line1
,
Line1N
);
if
(
Line2N
>
0
)
Polygon
(
dc
,
Line2
,
Line2N
);
...
...
@@ -1115,7 +1115,7 @@ static BOOL UITOOLS95_DrawFrameCaption(HDC dc, LPRECT r, UINT uFlags)
/* Make the final picture */
hbsave
=
(
HBRUSH
)
SelectObject
(
dc
,
GetSysColorBrush
(
colorIdx
));
hpsave
=
(
HPEN
)
SelectObject
(
dc
,
GetSysColor
Pen
(
colorIdx
));
hpsave
=
(
HPEN
)
SelectObject
(
dc
,
SYSCOLOR_Get
Pen
(
colorIdx
));
Polygon
(
dc
,
Line1
,
Line1N
);
if
(
Line2N
>
0
)
...
...
@@ -1193,13 +1193,13 @@ static BOOL UITOOLS95_DrawFrameScroll(HDC dc, LPRECT r, UINT uFlags)
hbsave
=
(
HBRUSH
)
SelectObject
(
dc
,
GetStockObject
(
NULL_BRUSH
));
if
(
uFlags
&
(
DFCS_MONO
|
DFCS_FLAT
))
{
hp
=
hp2
=
GetSysColor
Pen
(
COLOR_WINDOWFRAME
);
hp
=
hp2
=
SYSCOLOR_Get
Pen
(
COLOR_WINDOWFRAME
);
hb
=
hb2
=
GetSysColorBrush
(
COLOR_WINDOWFRAME
);
}
else
{
hp
=
GetSysColor
Pen
(
COLOR_BTNHIGHLIGHT
);
hp2
=
GetSysColor
Pen
(
COLOR_BTNSHADOW
);
hp
=
SYSCOLOR_Get
Pen
(
COLOR_BTNHIGHLIGHT
);
hp2
=
SYSCOLOR_Get
Pen
(
COLOR_BTNSHADOW
);
hb
=
GetSysColorBrush
(
COLOR_BTNHIGHLIGHT
);
hb2
=
GetSysColorBrush
(
COLOR_BTNSHADOW
);
}
...
...
@@ -1276,7 +1276,7 @@ static BOOL UITOOLS95_DrawFrameScroll(HDC dc, LPRECT r, UINT uFlags)
if
(
uFlags
&
DFCS_INACTIVE
)
{
hbsave
=
(
HBRUSH
)
SelectObject
(
dc
,
GetSysColorBrush
(
COLOR_BTNHIGHLIGHT
));
hpsave
=
(
HPEN
)
SelectObject
(
dc
,
GetSysColor
Pen
(
COLOR_BTNHIGHLIGHT
));
hpsave
=
(
HPEN
)
SelectObject
(
dc
,
SYSCOLOR_Get
Pen
(
COLOR_BTNHIGHLIGHT
));
Polygon
(
dc
,
Line
,
3
);
SelectObject
(
dc
,
hpsave
);
SelectObject
(
dc
,
hbsave
);
...
...
@@ -1291,7 +1291,7 @@ static BOOL UITOOLS95_DrawFrameScroll(HDC dc, LPRECT r, UINT uFlags)
i
=
uFlags
&
DFCS_INACTIVE
?
COLOR_BTNSHADOW
:
COLOR_BTNTEXT
;
hbsave
=
(
HBRUSH
)
SelectObject
(
dc
,
GetSysColorBrush
(
i
));
hpsave
=
(
HPEN
)
SelectObject
(
dc
,
GetSysColor
Pen
(
i
));
hpsave
=
(
HPEN
)
SelectObject
(
dc
,
SYSCOLOR_Get
Pen
(
i
));
Polygon
(
dc
,
Line
,
3
);
SelectObject
(
dc
,
hpsave
);
SelectObject
(
dc
,
hbsave
);
...
...
dlls/comctl32/pager.c
View file @
4344c368
...
...
@@ -79,14 +79,15 @@ static void
PAGER_DrawHorzArrow
(
HDC
hdc
,
RECT
r
,
INT
colorRef
,
BOOL
left
)
{
INT
x
,
y
,
w
,
h
;
HPEN
hOldPen
;
HPEN
h
Pen
,
h
OldPen
;
w
=
r
.
right
-
r
.
left
+
1
;
h
=
r
.
bottom
-
r
.
top
+
1
;
if
((
h
<
MIN_ARROW_WIDTH
)
||
(
w
<
MIN_ARROW_HEIGHT
))
return
;
/* refuse to draw partial arrow */
hOldPen
=
SelectObject
(
hdc
,
GetSysColorPen
(
colorRef
));
if
(
!
(
hPen
=
CreatePen
(
PS_SOLID
,
1
,
GetSysColor
(
colorRef
))))
return
;
hOldPen
=
SelectObject
(
hdc
,
hPen
);
if
(
left
)
{
x
=
r
.
left
+
((
w
-
MIN_ARROW_HEIGHT
)
/
2
)
+
3
;
...
...
@@ -111,6 +112,7 @@ PAGER_DrawHorzArrow (HDC hdc, RECT r, INT colorRef, BOOL left)
}
SelectObject
(
hdc
,
hOldPen
);
DeleteObject
(
hPen
);
}
/* the vertical arrows are:
...
...
@@ -126,14 +128,15 @@ static void
PAGER_DrawVertArrow
(
HDC
hdc
,
RECT
r
,
INT
colorRef
,
BOOL
up
)
{
INT
x
,
y
,
w
,
h
;
HPEN
hOldPen
;
HPEN
h
Pen
,
h
OldPen
;
w
=
r
.
right
-
r
.
left
+
1
;
h
=
r
.
bottom
-
r
.
top
+
1
;
if
((
h
<
MIN_ARROW_WIDTH
)
||
(
w
<
MIN_ARROW_HEIGHT
))
return
;
/* refuse to draw partial arrow */
hOldPen
=
SelectObject
(
hdc
,
GetSysColorPen
(
colorRef
));
if
(
!
(
hPen
=
CreatePen
(
PS_SOLID
,
1
,
GetSysColor
(
colorRef
))))
return
;
hOldPen
=
SelectObject
(
hdc
,
hPen
);
if
(
up
)
{
x
=
r
.
left
+
((
w
-
MIN_ARROW_HEIGHT
)
/
2
)
+
1
;
...
...
@@ -158,6 +161,7 @@ PAGER_DrawVertArrow (HDC hdc, RECT r, INT colorRef, BOOL up)
}
SelectObject
(
hdc
,
hOldPen
);
DeleteObject
(
hPen
);
}
static
void
...
...
dlls/comctl32/status.c
View file @
4344c368
...
...
@@ -82,7 +82,7 @@ static inline LPCSTR debugstr_t(LPCWSTR text, BOOL isW)
static
void
STATUSBAR_DrawSizeGrip
(
HDC
hdc
,
LPRECT
lpRect
)
{
HPEN
hOldPen
;
HPEN
h
PenFace
,
hPenShadow
,
hPenHighlight
,
h
OldPen
;
POINT
pt
;
INT
i
;
...
...
@@ -91,7 +91,8 @@ STATUSBAR_DrawSizeGrip (HDC hdc, LPRECT lpRect)
pt
.
x
=
lpRect
->
right
-
1
;
pt
.
y
=
lpRect
->
bottom
-
1
;
hOldPen
=
SelectObject
(
hdc
,
GetSysColorPen
(
COLOR_3DFACE
));
hPenFace
=
CreatePen
(
PS_SOLID
,
1
,
GetSysColor
(
COLOR_3DFACE
));
hOldPen
=
SelectObject
(
hdc
,
hPenFace
);
MoveToEx
(
hdc
,
pt
.
x
-
12
,
pt
.
y
,
NULL
);
LineTo
(
hdc
,
pt
.
x
,
pt
.
y
);
LineTo
(
hdc
,
pt
.
x
,
pt
.
y
-
13
);
...
...
@@ -99,7 +100,8 @@ STATUSBAR_DrawSizeGrip (HDC hdc, LPRECT lpRect)
pt
.
x
--
;
pt
.
y
--
;
SelectObject
(
hdc
,
GetSysColorPen
(
COLOR_3DSHADOW
));
hPenShadow
=
CreatePen
(
PS_SOLID
,
1
,
GetSysColor
(
COLOR_3DSHADOW
));
SelectObject
(
hdc
,
hPenShadow
);
for
(
i
=
1
;
i
<
11
;
i
+=
4
)
{
MoveToEx
(
hdc
,
pt
.
x
-
i
,
pt
.
y
,
NULL
);
LineTo
(
hdc
,
pt
.
x
+
1
,
pt
.
y
-
i
-
1
);
...
...
@@ -108,13 +110,17 @@ STATUSBAR_DrawSizeGrip (HDC hdc, LPRECT lpRect)
LineTo
(
hdc
,
pt
.
x
+
1
,
pt
.
y
-
i
-
2
);
}
SelectObject
(
hdc
,
GetSysColorPen
(
COLOR_3DHIGHLIGHT
));
hPenHighlight
=
CreatePen
(
PS_SOLID
,
1
,
GetSysColor
(
COLOR_3DHIGHLIGHT
));
SelectObject
(
hdc
,
hPenHighlight
);
for
(
i
=
3
;
i
<
13
;
i
+=
4
)
{
MoveToEx
(
hdc
,
pt
.
x
-
i
,
pt
.
y
,
NULL
);
LineTo
(
hdc
,
pt
.
x
+
1
,
pt
.
y
-
i
-
1
);
}
SelectObject
(
hdc
,
hOldPen
);
DeleteObject
(
hPenFace
);
DeleteObject
(
hPenShadow
);
DeleteObject
(
hPenHighlight
);
}
...
...
dlls/comctl32/tab.c
View file @
4344c368
...
...
@@ -1317,7 +1317,7 @@ TAB_DrawItemInterior
RECT
localRect
;
HPEN
htextPen
=
GetSysColorPen
(
COLOR_BTNTEXT
)
;
HPEN
htextPen
;
HPEN
holdPen
;
INT
oldBkMode
;
...
...
@@ -1368,6 +1368,7 @@ TAB_DrawItemInterior
/*
* Text pen
*/
htextPen
=
CreatePen
(
PS_SOLID
,
1
,
GetSysColor
(
COLOR_BTNTEXT
)
);
holdPen
=
SelectObject
(
hdc
,
htextPen
);
oldBkMode
=
SetBkMode
(
hdc
,
TRANSPARENT
);
...
...
@@ -1603,6 +1604,7 @@ TAB_DrawItemInterior
*/
SetBkMode
(
hdc
,
oldBkMode
);
SelectObject
(
hdc
,
holdPen
);
DeleteObject
(
htextPen
);
}
/******************************************************************************
...
...
@@ -1634,9 +1636,9 @@ static void TAB_DrawItem(
if
(
isVisible
)
{
HBRUSH
hbr
=
CreateSolidBrush
(
GetSysColor
(
COLOR_BTNFACE
));
HPEN
hwPen
=
GetSysColorPen
(
COLOR_3DHILIGHT
);
HPEN
hbPen
=
GetSysColorPen
(
COLOR_3DDKSHADOW
);
HPEN
hShade
=
GetSysColorPen
(
COLOR_BTNSHADOW
);
HPEN
hwPen
=
CreatePen
(
PS_SOLID
,
1
,
GetSysColor
(
COLOR_3DHILIGHT
)
);
HPEN
hbPen
=
CreatePen
(
PS_SOLID
,
1
,
GetSysColor
(
COLOR_3DDKSHADOW
)
);
HPEN
hShade
=
CreatePen
(
PS_SOLID
,
1
,
GetSysColor
(
COLOR_BTNSHADOW
)
);
HPEN
holdPen
;
BOOL
deleteBrush
=
TRUE
;
...
...
@@ -1885,6 +1887,9 @@ static void TAB_DrawItem(
/* Cleanup */
SelectObject
(
hdc
,
holdPen
);
DeleteObject
(
hwPen
);
DeleteObject
(
hbPen
);
DeleteObject
(
hShade
);
if
(
deleteBrush
)
DeleteObject
(
hbr
);
}
}
...
...
@@ -1899,9 +1904,9 @@ static void TAB_DrawBorder (HWND hwnd, HDC hdc)
{
TAB_INFO
*
infoPtr
=
TAB_GetInfoPtr
(
hwnd
);
HPEN
htmPen
;
HPEN
hwPen
=
GetSysColorPen
(
COLOR_3DHILIGHT
);
HPEN
hbPen
=
GetSysColorPen
(
COLOR_3DDKSHADOW
);
HPEN
hShade
=
GetSysColorPen
(
COLOR_BTNSHADOW
);
HPEN
hwPen
=
CreatePen
(
PS_SOLID
,
1
,
GetSysColor
(
COLOR_3DHILIGHT
)
);
HPEN
hbPen
=
CreatePen
(
PS_SOLID
,
1
,
GetSysColor
(
COLOR_3DDKSHADOW
)
);
HPEN
hShade
=
CreatePen
(
PS_SOLID
,
1
,
GetSysColor
(
COLOR_BTNSHADOW
)
);
RECT
rect
;
DWORD
lStyle
=
GetWindowLongA
(
hwnd
,
GWL_STYLE
);
...
...
@@ -1957,6 +1962,9 @@ static void TAB_DrawBorder (HWND hwnd, HDC hdc)
LineTo
(
hdc
,
rect
.
left
,
rect
.
bottom
-
1
);
SelectObject
(
hdc
,
htmPen
);
DeleteObject
(
hwPen
);
DeleteObject
(
hbPen
);
DeleteObject
(
hShade
);
}
/******************************************************************************
...
...
dlls/comctl32/toolbar.c
View file @
4344c368
...
...
@@ -467,7 +467,10 @@ static void
TOOLBAR_DrawArrow
(
HDC
hdc
,
INT
left
,
INT
top
,
INT
colorRef
)
{
INT
x
,
y
;
SelectObject
(
hdc
,
GetSysColorPen
(
colorRef
));
HPEN
hPen
,
hOldPen
;
if
(
!
(
hPen
=
CreatePen
(
PS_SOLID
,
1
,
GetSysColor
(
colorRef
))))
return
;
hOldPen
=
SelectObject
(
hdc
,
hPen
);
x
=
left
+
2
;
y
=
top
+
8
;
MoveToEx
(
hdc
,
x
,
y
,
NULL
);
...
...
@@ -476,6 +479,8 @@ TOOLBAR_DrawArrow (HDC hdc, INT left, INT top, INT colorRef)
LineTo
(
hdc
,
x
+
3
,
y
++
);
x
++
;
MoveToEx
(
hdc
,
x
,
y
,
NULL
);
LineTo
(
hdc
,
x
+
1
,
y
++
);
SelectObject
(
hdc
,
hOldPen
);
DeleteObject
(
hPen
);
}
/*
...
...
@@ -1986,7 +1991,7 @@ TOOLBAR_CustomizeDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
LPDRAWITEMSTRUCT
lpdis
=
(
LPDRAWITEMSTRUCT
)
lParam
;
RECT
rcButton
;
RECT
rcText
;
HPEN
hOldPen
;
HPEN
h
Pen
,
h
OldPen
;
HBRUSH
hOldBrush
;
COLORREF
oldText
=
0
;
COLORREF
oldBk
=
0
;
...
...
@@ -2005,7 +2010,9 @@ TOOLBAR_CustomizeDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
oldText
=
SetTextColor
(
lpdis
->
hDC
,
comctl32_color
.
clrGrayText
);
else
oldText
=
SetTextColor
(
lpdis
->
hDC
,
(
lpdis
->
itemState
&
ODS_FOCUS
)
?
comctl32_color
.
clrHighlightText
:
comctl32_color
.
clrWindowText
);
hOldPen
=
SelectObject
(
lpdis
->
hDC
,
GetSysColorPen
((
lpdis
->
itemState
&
ODS_SELECTED
)
?
COLOR_HIGHLIGHT
:
COLOR_WINDOW
));
hPen
=
CreatePen
(
PS_SOLID
,
1
,
GetSysColor
(
(
lpdis
->
itemState
&
ODS_SELECTED
)
?
COLOR_HIGHLIGHT
:
COLOR_WINDOW
));
hOldPen
=
SelectObject
(
lpdis
->
hDC
,
hPen
);
hOldBrush
=
SelectObject
(
lpdis
->
hDC
,
GetSysColorBrush
((
lpdis
->
itemState
&
ODS_FOCUS
)
?
COLOR_HIGHLIGHT
:
COLOR_WINDOW
));
/* fill background rectangle */
...
...
@@ -2038,7 +2045,7 @@ TOOLBAR_CustomizeDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
SelectObject
(
lpdis
->
hDC
,
hOldPen
);
SetBkColor
(
lpdis
->
hDC
,
oldBk
);
SetTextColor
(
lpdis
->
hDC
,
oldText
);
DeleteObject
(
hPen
);
return
TRUE
;
}
return
FALSE
;
...
...
dlls/user/user32.spec
View file @
4344c368
...
...
@@ -675,6 +675,5 @@ init UserClientDllInitialize
################################################################
# Wine extensions: extra useful functions not exported under Windows
#
@ stdcall GetSysColorPen(long) GetSysColorPen
@ stdcall wvsnprintfA(ptr long str ptr) wvsnprintfA
@ stdcall wvsnprintfW(ptr long wstr ptr) wvsnprintfW
include/user.h
View file @
4344c368
...
...
@@ -132,6 +132,9 @@ extern WINE_LOOK TWEAK_WineLook;
/* gray brush cache */
extern
HBRUSH
CACHE_GetPattern55AABrush
(
void
);
/* syscolor.c */
extern
HPEN
SYSCOLOR_GetPen
(
INT
index
);
extern
DWORD
USER16_AlertableWait
;
#endif
/* __WINE_USER_H */
include/winuser.h
View file @
4344c368
...
...
@@ -4243,7 +4243,6 @@ HRESULT WINAPI PrivateExtractIconsW(LPCWSTR,INT,DWORD,DWORD,HICON*,DWORD,UIN
/* Extra functions that don't exist in the Windows API */
HPEN
WINAPI
GetSysColorPen
(
INT
);
INT
WINAPI
wvsnprintfA
(
LPSTR
,
UINT
,
LPCSTR
,
va_list
);
INT
WINAPI
wvsnprintfW
(
LPWSTR
,
UINT
,
LPCWSTR
,
va_list
);
#define wvsnprintf WINELIB_NAME_AW(wvsnprintf)
...
...
windows/nonclient.c
View file @
4344c368
...
...
@@ -1313,7 +1313,7 @@ static void NC_DrawCaption95(
HPEN
hPrevPen
;
HMENU
hSysMenu
;
hPrevPen
=
SelectObject
(
hdc
,
GetSysColor
Pen
(
hPrevPen
=
SelectObject
(
hdc
,
SYSCOLOR_Get
Pen
(
((
exStyle
&
(
WS_EX_STATICEDGE
|
WS_EX_CLIENTEDGE
|
WS_EX_DLGMODALFRAME
))
==
WS_EX_STATICEDGE
)
?
COLOR_WINDOWFRAME
:
COLOR_3DFACE
)
);
...
...
@@ -1427,7 +1427,7 @@ static void NC_DoNCPaint( HWND hwnd, HRGN clip, BOOL suppress_menupaint )
rect
.
right
=
rectWindow
.
right
-
rectWindow
.
left
;
rect
.
bottom
=
rectWindow
.
bottom
-
rectWindow
.
top
;
SelectObject
(
hdc
,
GetSysColor
Pen
(
COLOR_WINDOWFRAME
)
);
SelectObject
(
hdc
,
SYSCOLOR_Get
Pen
(
COLOR_WINDOWFRAME
)
);
if
(
HAS_ANYFRAME
(
dwStyle
,
dwExStyle
))
{
...
...
@@ -1568,7 +1568,7 @@ static void NC_DoNCPaint95(
rectClip
=
rect
;
}
SelectObject
(
hdc
,
GetSysColor
Pen
(
COLOR_WINDOWFRAME
)
);
SelectObject
(
hdc
,
SYSCOLOR_Get
Pen
(
COLOR_WINDOWFRAME
)
);
if
(
HAS_STATICOUTERFRAME
(
dwStyle
,
dwExStyle
))
{
DrawEdge
(
hdc
,
&
rect
,
BDR_SUNKENOUTER
,
BF_RECT
|
BF_ADJUST
);
...
...
windows/syscolor.c
View file @
4344c368
...
...
@@ -386,13 +386,9 @@ HBRUSH WINAPI GetSysColorBrush( INT index )
/***********************************************************************
* GetSysColorPen (USER32.@) (Not a Windows API)
*
* This function is new to the Wine lib -- it does not exist in
* Windows. However, it is a natural complement for GetSysColorBrush
* in the Win32 API and is needed quite a bit inside Wine.
* SYSCOLOR_GetPen
*/
HPEN
WINAPI
GetSysColor
Pen
(
INT
index
)
HPEN
SYSCOLOR_Get
Pen
(
INT
index
)
{
/* We can assert here, because this function is internal to Wine */
assert
(
0
<=
index
&&
index
<
NUM_SYS_COLORS
);
...
...
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