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
50c7fd4e
Commit
50c7fd4e
authored
Sep 14, 2004
by
Robert Shearman
Committed by
Alexandre Julliard
Sep 14, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Set hbrBackground class property to same value as native.
- Use Unicode window functions instead of ANSI.
parent
62d60b9b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
30 deletions
+30
-30
pager.c
dlls/comctl32/pager.c
+30
-30
No files found.
dlls/comctl32/pager.c
View file @
50c7fd4e
...
@@ -335,7 +335,7 @@ PAGER_CalcSize (HWND hwnd, INT* size, BOOL getWidth)
...
@@ -335,7 +335,7 @@ PAGER_CalcSize (HWND hwnd, INT* size, BOOL getWidth)
nmpgcs
.
dwFlag
=
getWidth
?
PGF_CALCWIDTH
:
PGF_CALCHEIGHT
;
nmpgcs
.
dwFlag
=
getWidth
?
PGF_CALCWIDTH
:
PGF_CALCHEIGHT
;
nmpgcs
.
iWidth
=
getWidth
?
*
size
:
0
;
nmpgcs
.
iWidth
=
getWidth
?
*
size
:
0
;
nmpgcs
.
iHeight
=
getWidth
?
0
:
*
size
;
nmpgcs
.
iHeight
=
getWidth
?
0
:
*
size
;
SendMessage
A
(
infoPtr
->
hwndNotify
,
WM_NOTIFY
,
SendMessage
W
(
infoPtr
->
hwndNotify
,
WM_NOTIFY
,
(
WPARAM
)
nmpgcs
.
hdr
.
idFrom
,
(
LPARAM
)
&
nmpgcs
);
(
WPARAM
)
nmpgcs
.
hdr
.
idFrom
,
(
LPARAM
)
&
nmpgcs
);
*
size
=
getWidth
?
nmpgcs
.
iWidth
:
nmpgcs
.
iHeight
;
*
size
=
getWidth
?
nmpgcs
.
iWidth
:
nmpgcs
.
iHeight
;
...
@@ -515,7 +515,7 @@ PAGER_UpdateBtns(HWND hwnd, PAGER_INFO *infoPtr,
...
@@ -515,7 +515,7 @@ PAGER_UpdateBtns(HWND hwnd, PAGER_INFO *infoPtr,
}
}
if
(
repaintBtns
)
if
(
repaintBtns
)
SendMessage
A
(
hwnd
,
WM_NCPAINT
,
0
,
0
);
SendMessage
W
(
hwnd
,
WM_NCPAINT
,
0
,
0
);
}
}
static
LRESULT
static
LRESULT
...
@@ -571,7 +571,7 @@ PAGER_HandleWindowPosChanging(HWND hwnd, WPARAM wParam, WINDOWPOS *winpos)
...
@@ -571,7 +571,7 @@ PAGER_HandleWindowPosChanging(HWND hwnd, WPARAM wParam, WINDOWPOS *winpos)
return
0
;
return
0
;
}
}
DefWindowProc
A
(
hwnd
,
WM_WINDOWPOSCHANGING
,
wParam
,
(
LPARAM
)
winpos
);
DefWindowProc
W
(
hwnd
,
WM_WINDOWPOSCHANGING
,
wParam
,
(
LPARAM
)
winpos
);
return
1
;
return
1
;
}
}
...
@@ -643,8 +643,8 @@ PAGER_SetFixedHeight(HWND hwnd, PAGER_INFO* infoPtr)
...
@@ -643,8 +643,8 @@ PAGER_SetFixedHeight(HWND hwnd, PAGER_INFO* infoPtr)
* this module), the native control does only the following: *
* this module), the native control does only the following: *
* *
* *
* if (some condition) *
* if (some condition) *
* PostMessage
A
(hwnd, EM_FMTLINES, 0, 0); *
* PostMessage
W
(hwnd, EM_FMTLINES, 0, 0); *
* return DefWindowProc
A
(hwnd, PGM_RECALCSIZE, 0, 0); *
* return DefWindowProc
W
(hwnd, PGM_RECALCSIZE, 0, 0); *
* *
* *
* When we figure out what the "some condition" is we will *
* When we figure out what the "some condition" is we will *
* implement that for the message processing. *
* implement that for the message processing. *
...
@@ -797,7 +797,7 @@ PAGER_Scroll(HWND hwnd, INT dir)
...
@@ -797,7 +797,7 @@ PAGER_Scroll(HWND hwnd, INT dir)
}
}
nmpgScroll
.
iScroll
-=
2
*
infoPtr
->
nButtonSize
;
nmpgScroll
.
iScroll
-=
2
*
infoPtr
->
nButtonSize
;
SendMessage
A
(
infoPtr
->
hwndNotify
,
WM_NOTIFY
,
SendMessage
W
(
infoPtr
->
hwndNotify
,
WM_NOTIFY
,
(
WPARAM
)
nmpgScroll
.
hdr
.
idFrom
,
(
LPARAM
)
&
nmpgScroll
);
(
WPARAM
)
nmpgScroll
.
hdr
.
idFrom
,
(
LPARAM
)
&
nmpgScroll
);
TRACE
(
"[%p] PGN_SCROLL returns iScroll=%d
\n
"
,
hwnd
,
nmpgScroll
.
iScroll
);
TRACE
(
"[%p] PGN_SCROLL returns iScroll=%d
\n
"
,
hwnd
,
nmpgScroll
.
iScroll
);
...
@@ -830,7 +830,7 @@ PAGER_FmtLines(HWND hwnd)
...
@@ -830,7 +830,7 @@ PAGER_FmtLines(HWND hwnd)
0
,
0
,
infoPtr
->
nWidth
,
infoPtr
->
nHeight
,
0
,
0
,
infoPtr
->
nWidth
,
infoPtr
->
nHeight
,
0
);
0
);
return
DefWindowProc
A
(
hwnd
,
EM_FMTLINES
,
0
,
0
);
return
DefWindowProc
W
(
hwnd
,
EM_FMTLINES
,
0
,
0
);
}
}
static
LRESULT
static
LRESULT
...
@@ -904,7 +904,7 @@ PAGER_NCCalcSize(HWND hwnd, WPARAM wParam, LPARAM lParam)
...
@@ -904,7 +904,7 @@ PAGER_NCCalcSize(HWND hwnd, WPARAM wParam, LPARAM lParam)
* coordinates of the corresponding window's client area.
* coordinates of the corresponding window's client area.
*/
*/
DefWindowProc
A
(
hwnd
,
WM_NCCALCSIZE
,
wParam
,
lParam
);
DefWindowProc
W
(
hwnd
,
WM_NCCALCSIZE
,
wParam
,
lParam
);
TRACE
(
"orig rect=(%ld,%ld)-(%ld,%ld)
\n
"
,
TRACE
(
"orig rect=(%ld,%ld)-(%ld,%ld)
\n
"
,
lpRect
->
left
,
lpRect
->
top
,
lpRect
->
right
,
lpRect
->
bottom
);
lpRect
->
left
,
lpRect
->
top
,
lpRect
->
right
,
lpRect
->
bottom
);
...
@@ -1029,7 +1029,7 @@ PAGER_NCPaint (HWND hwnd, WPARAM wParam, LPARAM lParam)
...
@@ -1029,7 +1029,7 @@ PAGER_NCPaint (HWND hwnd, WPARAM wParam, LPARAM lParam)
if
(
dwStyle
&
WS_MINIMIZE
)
if
(
dwStyle
&
WS_MINIMIZE
)
return
0
;
return
0
;
DefWindowProc
A
(
hwnd
,
WM_NCPAINT
,
wParam
,
lParam
);
DefWindowProc
W
(
hwnd
,
WM_NCPAINT
,
wParam
,
lParam
);
if
(
!
(
hdc
=
GetDCEx
(
hwnd
,
0
,
DCX_USESTYLE
|
DCX_WINDOW
)))
if
(
!
(
hdc
=
GetDCEx
(
hwnd
,
0
,
DCX_USESTYLE
|
DCX_WINDOW
)))
return
0
;
return
0
;
...
@@ -1155,7 +1155,7 @@ PAGER_SetCursor( HWND hwnd, WPARAM wParam, LPARAM lParam )
...
@@ -1155,7 +1155,7 @@ PAGER_SetCursor( HWND hwnd, WPARAM wParam, LPARAM lParam )
{
{
PAGER_CaptureandTrack
(
infoPtr
,
hwnd
);
PAGER_CaptureandTrack
(
infoPtr
,
hwnd
);
SendMessage
A
(
hwnd
,
WM_NCPAINT
,
0
,
0
);
SendMessage
W
(
hwnd
,
WM_NCPAINT
,
0
,
0
);
}
}
return
TRUE
;
return
TRUE
;
...
@@ -1180,7 +1180,7 @@ PAGER_MouseLeave (HWND hwnd, WPARAM wParam, LPARAM lParam)
...
@@ -1180,7 +1180,7 @@ PAGER_MouseLeave (HWND hwnd, WPARAM wParam, LPARAM lParam)
nmhdr
.
hwndFrom
=
hwnd
;
nmhdr
.
hwndFrom
=
hwnd
;
nmhdr
.
idFrom
=
GetWindowLongPtrW
(
hwnd
,
GWLP_ID
);
nmhdr
.
idFrom
=
GetWindowLongPtrW
(
hwnd
,
GWLP_ID
);
nmhdr
.
code
=
NM_RELEASEDCAPTURE
;
nmhdr
.
code
=
NM_RELEASEDCAPTURE
;
SendMessage
A
(
infoPtr
->
hwndNotify
,
WM_NOTIFY
,
SendMessage
W
(
infoPtr
->
hwndNotify
,
WM_NOTIFY
,
(
WPARAM
)
nmhdr
.
idFrom
,
(
LPARAM
)
&
nmhdr
);
(
WPARAM
)
nmhdr
.
idFrom
,
(
LPARAM
)
&
nmhdr
);
}
}
...
@@ -1253,7 +1253,7 @@ PAGER_MouseMove (HWND hwnd, WPARAM wParam, LPARAM lParam)
...
@@ -1253,7 +1253,7 @@ PAGER_MouseMove (HWND hwnd, WPARAM wParam, LPARAM lParam)
PAGER_DrawButton
(
hdc
,
infoPtr
->
clrBk
,
*
btnrect
,
PAGER_DrawButton
(
hdc
,
infoPtr
->
clrBk
,
*
btnrect
,
PAGER_IsHorizontal
(
hwnd
),
topLeft
,
btnstate
);
PAGER_IsHorizontal
(
hwnd
),
topLeft
,
btnstate
);
ReleaseDC
(
hwnd
,
hdc
);
ReleaseDC
(
hwnd
,
hdc
);
return
DefWindowProc
A
(
hwnd
,
WM_MOUSEMOVE
,
wParam
,
lParam
);
return
DefWindowProc
W
(
hwnd
,
WM_MOUSEMOVE
,
wParam
,
lParam
);
}
}
}
}
...
@@ -1270,14 +1270,14 @@ PAGER_MouseMove (HWND hwnd, WPARAM wParam, LPARAM lParam)
...
@@ -1270,14 +1270,14 @@ PAGER_MouseMove (HWND hwnd, WPARAM wParam, LPARAM lParam)
nmhdr
.
hwndFrom
=
hwnd
;
nmhdr
.
hwndFrom
=
hwnd
;
nmhdr
.
idFrom
=
GetWindowLongPtrW
(
hwnd
,
GWLP_ID
);
nmhdr
.
idFrom
=
GetWindowLongPtrW
(
hwnd
,
GWLP_ID
);
nmhdr
.
code
=
NM_RELEASEDCAPTURE
;
nmhdr
.
code
=
NM_RELEASEDCAPTURE
;
SendMessage
A
(
infoPtr
->
hwndNotify
,
WM_NOTIFY
,
SendMessage
W
(
infoPtr
->
hwndNotify
,
WM_NOTIFY
,
(
WPARAM
)
nmhdr
.
idFrom
,
(
LPARAM
)
&
nmhdr
);
(
WPARAM
)
nmhdr
.
idFrom
,
(
LPARAM
)
&
nmhdr
);
}
}
}
}
if
(
IsWindow
(
hwnd
))
if
(
IsWindow
(
hwnd
))
KillTimer
(
hwnd
,
TIMERID1
);
KillTimer
(
hwnd
,
TIMERID1
);
}
}
return
DefWindowProc
A
(
hwnd
,
WM_MOUSEMOVE
,
wParam
,
lParam
);
return
DefWindowProc
W
(
hwnd
,
WM_MOUSEMOVE
,
wParam
,
lParam
);
}
}
static
LRESULT
static
LRESULT
...
@@ -1310,7 +1310,7 @@ PAGER_LButtonDown (HWND hwnd, WPARAM wParam, LPARAM lParam)
...
@@ -1310,7 +1310,7 @@ PAGER_LButtonDown (HWND hwnd, WPARAM wParam, LPARAM lParam)
}
}
if
(
repaintBtns
)
if
(
repaintBtns
)
SendMessage
A
(
hwnd
,
WM_NCPAINT
,
0
,
0
);
SendMessage
W
(
hwnd
,
WM_NCPAINT
,
0
,
0
);
switch
(
hit
)
switch
(
hit
)
{
{
...
@@ -1417,7 +1417,7 @@ PAGER_EraseBackground (HWND hwnd, WPARAM wParam, LPARAM lParam)
...
@@ -1417,7 +1417,7 @@ PAGER_EraseBackground (HWND hwnd, WPARAM wParam, LPARAM lParam)
* pt.x=0; pt.y=0; ?????
* pt.x=0; pt.y=0; ?????
* MapWindowPoints(pager, parent, &pt, 1)
* MapWindowPoints(pager, parent, &pt, 1)
* OffsetWindowOrgEx(hdc, pt.x, pt.y, &ptorg)
* OffsetWindowOrgEx(hdc, pt.x, pt.y, &ptorg)
* SendMessage
A
(parent, WM_ERASEBKGND, hdc, 0)
* SendMessage
W
(parent, WM_ERASEBKGND, hdc, 0)
* SetWindowOrgEx(hdc, 0, 0, 0)
* SetWindowOrgEx(hdc, 0, 0, 0)
*/
*/
...
@@ -1426,7 +1426,7 @@ PAGER_EraseBackground (HWND hwnd, WPARAM wParam, LPARAM lParam)
...
@@ -1426,7 +1426,7 @@ PAGER_EraseBackground (HWND hwnd, WPARAM wParam, LPARAM lParam)
parent
=
GetParent
(
hwnd
);
parent
=
GetParent
(
hwnd
);
MapWindowPoints
(
hwnd
,
parent
,
&
pt
,
1
);
MapWindowPoints
(
hwnd
,
parent
,
&
pt
,
1
);
OffsetWindowOrgEx
(
hdc
,
pt
.
x
,
pt
.
y
,
&
ptorig
);
OffsetWindowOrgEx
(
hdc
,
pt
.
x
,
pt
.
y
,
&
ptorig
);
SendMessage
A
(
parent
,
WM_ERASEBKGND
,
wParam
,
lParam
);
SendMessage
W
(
parent
,
WM_ERASEBKGND
,
wParam
,
lParam
);
SetWindowOrgEx
(
hdc
,
ptorig
.
x
,
ptorig
.
y
,
0
);
SetWindowOrgEx
(
hdc
,
ptorig
.
x
,
ptorig
.
y
,
0
);
...
@@ -1475,7 +1475,7 @@ PAGER_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
...
@@ -1475,7 +1475,7 @@ PAGER_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
PAGER_INFO
*
infoPtr
=
PAGER_GetInfoPtr
(
hwnd
);
PAGER_INFO
*
infoPtr
=
PAGER_GetInfoPtr
(
hwnd
);
if
(
!
infoPtr
&&
(
uMsg
!=
WM_CREATE
))
if
(
!
infoPtr
&&
(
uMsg
!=
WM_CREATE
))
return
DefWindowProc
A
(
hwnd
,
uMsg
,
wParam
,
lParam
);
return
DefWindowProc
W
(
hwnd
,
uMsg
,
wParam
,
lParam
);
switch
(
uMsg
)
switch
(
uMsg
)
{
{
...
@@ -1551,7 +1551,7 @@ PAGER_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
...
@@ -1551,7 +1551,7 @@ PAGER_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case
WM_MOUSEMOVE
:
case
WM_MOUSEMOVE
:
if
(
infoPtr
->
bForward
&&
infoPtr
->
hwndChild
)
if
(
infoPtr
->
bForward
&&
infoPtr
->
hwndChild
)
PostMessage
A
(
infoPtr
->
hwndChild
,
WM_MOUSEMOVE
,
wParam
,
lParam
);
PostMessage
W
(
infoPtr
->
hwndChild
,
WM_MOUSEMOVE
,
wParam
,
lParam
);
return
PAGER_MouseMove
(
hwnd
,
wParam
,
lParam
);
return
PAGER_MouseMove
(
hwnd
,
wParam
,
lParam
);
case
WM_MOUSELEAVE
:
case
WM_MOUSELEAVE
:
...
@@ -1578,10 +1578,10 @@ PAGER_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
...
@@ -1578,10 +1578,10 @@ PAGER_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case
WM_NOTIFY
:
case
WM_NOTIFY
:
case
WM_COMMAND
:
case
WM_COMMAND
:
return
SendMessage
A
(
infoPtr
->
hwndNotify
,
uMsg
,
wParam
,
lParam
);
return
SendMessage
W
(
infoPtr
->
hwndNotify
,
uMsg
,
wParam
,
lParam
);
default:
default:
return
DefWindowProc
A
(
hwnd
,
uMsg
,
wParam
,
lParam
);
return
DefWindowProc
W
(
hwnd
,
uMsg
,
wParam
,
lParam
);
}
}
return
0
;
return
0
;
...
@@ -1591,23 +1591,23 @@ PAGER_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
...
@@ -1591,23 +1591,23 @@ PAGER_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
VOID
VOID
PAGER_Register
(
void
)
PAGER_Register
(
void
)
{
{
WNDCLASS
A
wndClass
;
WNDCLASS
W
wndClass
;
ZeroMemory
(
&
wndClass
,
sizeof
(
WNDCLASS
A
));
ZeroMemory
(
&
wndClass
,
sizeof
(
WNDCLASS
W
));
wndClass
.
style
=
CS_GLOBALCLASS
|
CS_DBLCLKS
|
CS_SAVEBITS
;
wndClass
.
style
=
CS_GLOBALCLASS
;
wndClass
.
lpfnWndProc
=
(
WNDPROC
)
PAGER_WindowProc
;
wndClass
.
lpfnWndProc
=
PAGER_WindowProc
;
wndClass
.
cbClsExtra
=
0
;
wndClass
.
cbClsExtra
=
0
;
wndClass
.
cbWndExtra
=
sizeof
(
PAGER_INFO
*
);
wndClass
.
cbWndExtra
=
sizeof
(
PAGER_INFO
*
);
wndClass
.
hCursor
=
LoadCursor
A
(
0
,
(
LP
STR
)
IDC_ARROW
);
wndClass
.
hCursor
=
LoadCursor
W
(
0
,
(
LPW
STR
)
IDC_ARROW
);
wndClass
.
hbrBackground
=
0
;
wndClass
.
hbrBackground
=
(
HBRUSH
)(
COLOR_BTNFACE
+
1
)
;
wndClass
.
lpszClassName
=
WC_PAGESCROLLER
A
;
wndClass
.
lpszClassName
=
WC_PAGESCROLLER
W
;
RegisterClass
A
(
&
wndClass
);
RegisterClass
W
(
&
wndClass
);
}
}
VOID
VOID
PAGER_Unregister
(
void
)
PAGER_Unregister
(
void
)
{
{
UnregisterClass
A
(
WC_PAGESCROLLERA
,
NULL
);
UnregisterClass
W
(
WC_PAGESCROLLERW
,
NULL
);
}
}
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