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
bf9390e7
Commit
bf9390e7
authored
Jan 14, 2003
by
Alberto Massari
Committed by
Alexandre Julliard
Jan 14, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle the WS_EX_LEFTSCROLLBAR style (that is, draw the vertical
scrollbar on the left side of the control).
parent
9e436833
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
10 deletions
+33
-10
scroll.c
controls/scroll.c
+4
-1
nonclient.c
windows/nonclient.c
+29
-9
No files found.
controls/scroll.c
View file @
bf9390e7
...
...
@@ -229,7 +229,10 @@ static BOOL SCROLL_GetScrollBarRect( HWND hwnd, INT nBar, RECT *lprect,
break
;
case
SB_VERT
:
lprect
->
left
=
wndPtr
->
rectClient
.
right
-
wndPtr
->
rectWindow
.
left
;
if
((
wndPtr
->
dwExStyle
&
WS_EX_LEFTSCROLLBAR
)
!=
0
)
lprect
->
left
=
wndPtr
->
rectClient
.
left
-
wndPtr
->
rectWindow
.
left
-
GetSystemMetrics
(
SM_CXVSCROLL
);
else
lprect
->
left
=
wndPtr
->
rectClient
.
right
-
wndPtr
->
rectWindow
.
left
;
lprect
->
top
=
wndPtr
->
rectClient
.
top
-
wndPtr
->
rectWindow
.
top
;
lprect
->
right
=
lprect
->
left
+
GetSystemMetrics
(
SM_CXVSCROLL
);
lprect
->
bottom
=
wndPtr
->
rectClient
.
bottom
-
wndPtr
->
rectWindow
.
top
;
...
...
windows/nonclient.c
View file @
bf9390e7
...
...
@@ -224,7 +224,13 @@ NC_AdjustRectInner95 (LPRECT rect, DWORD style, DWORD exStyle)
if
(
exStyle
&
WS_EX_CLIENTEDGE
)
InflateRect
(
rect
,
GetSystemMetrics
(
SM_CXEDGE
),
GetSystemMetrics
(
SM_CYEDGE
));
if
(
style
&
WS_VSCROLL
)
rect
->
right
+=
GetSystemMetrics
(
SM_CXVSCROLL
);
if
(
style
&
WS_VSCROLL
)
{
if
((
exStyle
&
WS_EX_LEFTSCROLLBAR
)
!=
0
)
rect
->
left
-=
GetSystemMetrics
(
SM_CXVSCROLL
);
else
rect
->
right
+=
GetSystemMetrics
(
SM_CXVSCROLL
);
}
if
(
style
&
WS_HSCROLL
)
rect
->
bottom
+=
GetSystemMetrics
(
SM_CYHSCROLL
);
}
...
...
@@ -648,8 +654,11 @@ static LONG NC_DoNCHitTest (WND *wndPtr, POINT pt )
if
(
wndPtr
->
dwStyle
&
WS_VSCROLL
)
{
rect
.
right
+=
GetSystemMetrics
(
SM_CXVSCROLL
);
if
(
PtInRect
(
&
rect
,
pt
))
return
HTVSCROLL
;
if
((
wndPtr
->
dwExStyle
&
WS_EX_LEFTSCROLLBAR
)
!=
0
)
rect
.
left
-=
GetSystemMetrics
(
SM_CXVSCROLL
);
else
rect
.
right
+=
GetSystemMetrics
(
SM_CXVSCROLL
);
if
(
PtInRect
(
&
rect
,
pt
))
return
HTVSCROLL
;
}
/* Check horizontal scroll bar */
...
...
@@ -661,7 +670,8 @@ static LONG NC_DoNCHitTest (WND *wndPtr, POINT pt )
{
/* Check size box */
if
((
wndPtr
->
dwStyle
&
WS_VSCROLL
)
&&
(
pt
.
x
>=
rect
.
right
-
GetSystemMetrics
(
SM_CXVSCROLL
)))
((((
wndPtr
->
dwExStyle
&
WS_EX_LEFTSCROLLBAR
)
!=
0
)
&&
(
pt
.
x
<=
rect
.
left
+
GetSystemMetrics
(
SM_CXVSCROLL
)))
||
(((
wndPtr
->
dwExStyle
&
WS_EX_LEFTSCROLLBAR
)
==
0
)
&&
(
pt
.
x
>=
rect
.
right
-
GetSystemMetrics
(
SM_CXVSCROLL
)))))
return
HTSIZE
;
return
HTHSCROLL
;
}
...
...
@@ -794,8 +804,11 @@ static LONG NC_DoNCHitTest95 (WND *wndPtr, POINT pt )
if
(
wndPtr
->
dwStyle
&
WS_VSCROLL
)
{
rect
.
right
+=
GetSystemMetrics
(
SM_CXVSCROLL
);
if
(
PtInRect
(
&
rect
,
pt
))
return
HTVSCROLL
;
if
((
wndPtr
->
dwExStyle
&
WS_EX_LEFTSCROLLBAR
)
!=
0
)
rect
.
left
-=
GetSystemMetrics
(
SM_CXVSCROLL
);
else
rect
.
right
+=
GetSystemMetrics
(
SM_CXVSCROLL
);
if
(
PtInRect
(
&
rect
,
pt
))
return
HTVSCROLL
;
}
/* Check horizontal scroll bar */
...
...
@@ -807,7 +820,8 @@ static LONG NC_DoNCHitTest95 (WND *wndPtr, POINT pt )
{
/* Check size box */
if
((
wndPtr
->
dwStyle
&
WS_VSCROLL
)
&&
(
pt
.
x
>=
rect
.
right
-
GetSystemMetrics
(
SM_CXVSCROLL
)))
((((
wndPtr
->
dwExStyle
&
WS_EX_LEFTSCROLLBAR
)
!=
0
)
&&
(
pt
.
x
<=
rect
.
left
+
GetSystemMetrics
(
SM_CXVSCROLL
)))
||
(((
wndPtr
->
dwExStyle
&
WS_EX_LEFTSCROLLBAR
)
==
0
)
&&
(
pt
.
x
>=
rect
.
right
-
GetSystemMetrics
(
SM_CXVSCROLL
)))))
return
HTSIZE
;
return
HTHSCROLL
;
}
...
...
@@ -1466,7 +1480,10 @@ static void NC_DoNCPaint( HWND hwnd, HRGN clip, BOOL suppress_menupaint )
if
((
dwStyle
&
WS_VSCROLL
)
&&
(
dwStyle
&
WS_HSCROLL
))
{
RECT
r
=
rect
;
r
.
left
=
r
.
right
-
GetSystemMetrics
(
SM_CXVSCROLL
)
+
1
;
if
((
dwExStyle
&
WS_EX_LEFTSCROLLBAR
)
!=
0
)
r
.
right
=
r
.
left
+
GetSystemMetrics
(
SM_CXVSCROLL
)
+
1
;
else
r
.
left
=
r
.
right
-
GetSystemMetrics
(
SM_CXVSCROLL
)
+
1
;
r
.
top
=
r
.
bottom
-
GetSystemMetrics
(
SM_CYHSCROLL
)
+
1
;
if
(
wndPtr
->
dwStyle
&
WS_BORDER
)
{
r
.
left
++
;
...
...
@@ -1621,7 +1638,10 @@ static void NC_DoNCPaint95(
if
((
dwStyle
&
WS_VSCROLL
)
&&
(
dwStyle
&
WS_HSCROLL
))
{
RECT
r
=
rect
;
r
.
left
=
r
.
right
-
GetSystemMetrics
(
SM_CXVSCROLL
)
+
1
;
if
((
dwExStyle
&
WS_EX_LEFTSCROLLBAR
)
!=
0
)
r
.
right
=
r
.
left
+
GetSystemMetrics
(
SM_CXVSCROLL
)
+
1
;
else
r
.
left
=
r
.
right
-
GetSystemMetrics
(
SM_CXVSCROLL
)
+
1
;
r
.
top
=
r
.
bottom
-
GetSystemMetrics
(
SM_CYHSCROLL
)
+
1
;
FillRect
(
hdc
,
&
r
,
GetSysColorBrush
(
COLOR_SCROLLBAR
)
);
}
...
...
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