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
496f434c
Commit
496f434c
authored
Mar 05, 2001
by
Susan Farley
Committed by
Alexandre Julliard
Mar 05, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Background of the child wnd should be erased with the same color as
the control. - Default scroll amount should be the minimum client area.
parent
53cad8b7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
12 deletions
+21
-12
pager.c
dlls/comctl32/pager.c
+21
-12
No files found.
dlls/comctl32/pager.c
View file @
496f434c
...
...
@@ -529,7 +529,7 @@ PAGER_SetFixedWidth(HWND hwnd, PAGER_INFO* infoPtr)
infoPtr
->
nWidth
+=
infoPtr
->
nButtonSize
/
3
;
}
h
=
wndRect
.
bottom
-
wndRect
.
top
;
h
=
wndRect
.
bottom
-
wndRect
.
top
+
infoPtr
->
nButtonSize
;
/* adjust non-scrollable dimension to fit the child */
SetWindowPos
(
hwnd
,
0
,
0
,
0
,
infoPtr
->
nWidth
,
h
,
...
...
@@ -563,7 +563,7 @@ PAGER_SetFixedHeight(HWND hwnd, PAGER_INFO* infoPtr)
infoPtr
->
nHeight
+=
infoPtr
->
nButtonSize
/
3
;
}
w
=
wndRect
.
right
-
wndRect
.
left
;
w
=
wndRect
.
right
-
wndRect
.
left
+
infoPtr
->
nButtonSize
;
/* adjust non-scrollable dimension to fit the child */
SetWindowPos
(
hwnd
,
0
,
0
,
0
,
w
,
infoPtr
->
nHeight
,
...
...
@@ -607,6 +607,7 @@ PAGER_SetBkColor (HWND hwnd, WPARAM wParam, LPARAM lParam)
TRACE
(
"[%04x] %06lx
\n
"
,
hwnd
,
infoPtr
->
clrBk
);
PAGER_RecalcSize
(
hwnd
);
SendMessageA
(
hwnd
,
WM_NCPAINT
,
(
WPARAM
)
0
,
(
LPARAM
)
0
);
return
(
LRESULT
)
clrTemp
;
}
...
...
@@ -674,6 +675,7 @@ PAGER_Scroll(HWND hwnd, INT dir)
{
PAGER_INFO
*
infoPtr
=
PAGER_GetInfoPtr
(
hwnd
);
NMPGSCROLL
nmpgScroll
;
RECT
rcWnd
;
if
(
infoPtr
->
hwndChild
)
{
...
...
@@ -682,22 +684,22 @@ PAGER_Scroll(HWND hwnd, INT dir)
nmpgScroll
.
hdr
.
idFrom
=
GetWindowLongA
(
hwnd
,
GWL_ID
);
nmpgScroll
.
hdr
.
code
=
PGN_SCROLL
;
GetWindowRect
(
hwnd
,
&
rcWnd
);
GetClientRect
(
hwnd
,
&
nmpgScroll
.
rcParent
);
nmpgScroll
.
iXpos
=
nmpgScroll
.
iYpos
=
0
;
nmpgScroll
.
iDir
=
dir
;
if
(
PAGER_IsHorizontal
(
hwnd
))
{
nmpgScroll
.
iScroll
=
nmpgScroll
.
rcParent
.
right
-
nmpgScroll
.
rcParent
.
left
;
nmpgScroll
.
iScroll
=
rcWnd
.
right
-
rcWnd
.
left
;
nmpgScroll
.
iXpos
=
infoPtr
->
nPos
;
}
else
{
nmpgScroll
.
iScroll
=
nmpgScroll
.
rcParent
.
bottom
-
nmpgScroll
.
rcParent
.
top
;
nmpgScroll
.
iScroll
=
rcWnd
.
bottom
-
rcWnd
.
top
;
nmpgScroll
.
iYpos
=
infoPtr
->
nPos
;
}
nmpgScroll
.
iScroll
-=
2
*
infoPtr
->
nButtonSize
;
SendMessageA
(
hwnd
,
WM_NOTIFY
,
(
WPARAM
)
nmpgScroll
.
hdr
.
idFrom
,
(
LPARAM
)
&
nmpgScroll
);
...
...
@@ -720,8 +722,6 @@ PAGER_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
PAGER_INFO
*
infoPtr
;
DWORD
dwStyle
=
GetWindowLongA
(
hwnd
,
GWL_STYLE
);
dwStyle
|=
WS_CLIPCHILDREN
;
/* allocate memory for info structure */
infoPtr
=
(
PAGER_INFO
*
)
COMCTL32_Alloc
(
sizeof
(
PAGER_INFO
));
SetWindowLongA
(
hwnd
,
0
,
(
DWORD
)
infoPtr
);
...
...
@@ -749,9 +749,11 @@ PAGER_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
* the control is initialized, but just in case it isn't, set it here.
*/
if
(
!
(
dwStyle
&
PGS_HORZ
)
&&
!
(
dwStyle
&
PGS_VERT
))
{
dwStyle
|=
PGS_VERT
;
SetWindowLongA
(
hwnd
,
GWL_STYLE
,
dwStyle
);
}
SetWindowLongA
(
hwnd
,
GWL_STYLE
,
dwStyle
);
return
0
;
}
...
...
@@ -970,14 +972,13 @@ PAGER_MouseLeave (HWND hwnd, WPARAM wParam, LPARAM lParam)
ReleaseCapture
();
/* Notify parent of released mouse capture */
if
(
infoPtr
->
hwndChild
)
{
NMHDR
nmhdr
;
ZeroMemory
(
&
nmhdr
,
sizeof
(
NMHDR
));
nmhdr
.
hwndFrom
=
hwnd
;
nmhdr
.
idFrom
=
GetWindowLongA
(
hwnd
,
GWL_ID
);
nmhdr
.
code
=
NM_RELEASEDCAPTURE
;
SendMessageA
(
GetParent
(
infoPtr
->
hwndChil
d
),
WM_NOTIFY
,
SendMessageA
(
GetParent
(
hwn
d
),
WM_NOTIFY
,
(
WPARAM
)
nmhdr
.
idFrom
,
(
LPARAM
)
&
nmhdr
);
}
...
...
@@ -1057,9 +1058,17 @@ PAGER_EraseBackground (HWND hwnd, WPARAM wParam, LPARAM lParam)
PAGER_INFO
*
infoPtr
=
PAGER_GetInfoPtr
(
hwnd
);
HBRUSH
hBrush
=
CreateSolidBrush
(
infoPtr
->
clrBk
);
RECT
rect
;
GetClientRect
(
hwnd
,
&
rect
);
GetClientRect
(
hwnd
,
&
rect
);
FillRect
((
HDC
)
wParam
,
&
rect
,
hBrush
);
/* background color of the child should be the same as the pager */
if
(
infoPtr
->
hwndChild
)
{
GetClientRect
(
infoPtr
->
hwndChild
,
&
rect
);
FillRect
((
HDC
)
wParam
,
&
rect
,
hBrush
);
}
DeleteObject
(
hBrush
);
return
TRUE
;
}
...
...
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