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
a79c534c
Commit
a79c534c
authored
Nov 24, 2004
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid using the MAKEPOINTS macro, it's broken on big endian.
parent
73e8baff
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
103 additions
and
98 deletions
+103
-98
comboex.c
dlls/comctl32/comboex.c
+2
-1
datetime.c
dlls/comctl32/datetime.c
+11
-7
listview.c
dlls/comctl32/listview.c
+43
-43
rebar.c
dlls/comctl32/rebar.c
+21
-24
syslink.c
dlls/comctl32/syslink.c
+2
-4
trackbar.c
dlls/comctl32/trackbar.c
+14
-10
updown.c
dlls/comctl32/updown.c
+3
-3
listview.c
programs/regedit/listview.c
+3
-3
winefile.c
programs/winefile/winefile.c
+4
-3
No files found.
dlls/comctl32/comboex.c
View file @
a79c534c
...
...
@@ -1910,7 +1910,8 @@ COMBOEX_ComboWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
rect
.
bottom
=
rect
.
top
+
SendMessageW
(
infoPtr
->
hwndSelf
,
CB_GETITEMHEIGHT
,
-
1
,
0
);
rect
.
left
=
rect
.
right
-
GetSystemMetrics
(
SM_CXVSCROLL
);
POINTSTOPOINT
(
pt
,
MAKEPOINTS
(
lParam
));
pt
.
x
=
(
short
)
LOWORD
(
lParam
);
pt
.
y
=
(
short
)
HIWORD
(
lParam
);
if
(
PtInRect
(
&
rect
,
pt
))
return
CallWindowProcW
(
infoPtr
->
prevComboWndProc
,
hwnd
,
uMsg
,
wParam
,
lParam
);
...
...
dlls/comctl32/datetime.c
View file @
a79c534c
...
...
@@ -563,11 +563,15 @@ DATETIME_HitTest (DATETIME_INFO *infoPtr, POINT pt)
static
LRESULT
DATETIME_LButtonDown
(
DATETIME_INFO
*
infoPtr
,
WORD
wKey
,
POINTS
pts
)
DATETIME_LButtonDown
(
DATETIME_INFO
*
infoPtr
,
WORD
wKey
,
INT
x
,
INT
y
)
{
POINT
pt
=
{
pts
.
x
,
pts
.
y
};
int
old
=
infoPtr
->
select
;
int
new
=
DATETIME_HitTest
(
infoPtr
,
pt
);
POINT
pt
;
int
old
,
new
;
pt
.
x
=
x
;
pt
.
y
=
y
;
old
=
infoPtr
->
select
;
new
=
DATETIME_HitTest
(
infoPtr
,
pt
);
/* FIXME: might be conditions where we don't want to update infoPtr->select */
infoPtr
->
select
=
new
;
...
...
@@ -614,7 +618,7 @@ DATETIME_LButtonDown (DATETIME_INFO *infoPtr, WORD wKey, POINTS pts)
static
LRESULT
DATETIME_LButtonUp
(
DATETIME_INFO
*
infoPtr
,
WORD
wKey
,
POINTS
pts
)
DATETIME_LButtonUp
(
DATETIME_INFO
*
infoPtr
,
WORD
wKey
)
{
if
(
infoPtr
->
bCalDepressed
==
TRUE
)
{
infoPtr
->
bCalDepressed
=
FALSE
;
...
...
@@ -1003,10 +1007,10 @@ DATETIME_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return
DATETIME_Size
(
infoPtr
,
wParam
,
(
SHORT
)
LOWORD
(
lParam
),
(
SHORT
)
HIWORD
(
lParam
));
case
WM_LBUTTONDOWN
:
return
DATETIME_LButtonDown
(
infoPtr
,
(
WORD
)
wParam
,
MAKEPOINTS
(
lParam
));
return
DATETIME_LButtonDown
(
infoPtr
,
(
WORD
)
wParam
,
(
SHORT
)
LOWORD
(
lParam
),
(
SHORT
)
HIWORD
(
lParam
));
case
WM_LBUTTONUP
:
return
DATETIME_LButtonUp
(
infoPtr
,
(
WORD
)
wParam
,
MAKEPOINTS
(
lParam
)
);
return
DATETIME_LButtonUp
(
infoPtr
,
(
WORD
)
wParam
);
case
WM_CREATE
:
return
DATETIME_Create
(
hwnd
,
(
LPCREATESTRUCTW
)
lParam
);
...
...
dlls/comctl32/listview.c
View file @
a79c534c
...
...
@@ -3140,7 +3140,7 @@ static BOOL LISTVIEW_KeySelection(LISTVIEW_INFO *infoPtr, INT nItem)
* PARAMETER(S):
* [I] infoPtr : valid pointer to the listview structure
* [I] fwKeys : key indicator
* [I]
pts
: mouse position
* [I]
x,y
: mouse position
*
* RETURN:
* 0 if the message was processed, non-zero if there was an error
...
...
@@ -3150,7 +3150,7 @@ static BOOL LISTVIEW_KeySelection(LISTVIEW_INFO *infoPtr, INT nItem)
* over the item for a certain period of time.
*
*/
static
LRESULT
LISTVIEW_MouseHover
(
LISTVIEW_INFO
*
infoPtr
,
WORD
fwKyes
,
POINTS
pts
)
static
LRESULT
LISTVIEW_MouseHover
(
LISTVIEW_INFO
*
infoPtr
,
WORD
fwKyes
,
INT
x
,
INT
y
)
{
if
(
infoPtr
->
dwLvExStyle
&
LVS_EX_TRACKSELECT
)
/* FIXME: select the item!!! */
...
...
@@ -3166,12 +3166,12 @@ static LRESULT LISTVIEW_MouseHover(LISTVIEW_INFO *infoPtr, WORD fwKyes, POINTS p
* PARAMETER(S):
* [I] infoPtr : valid pointer to the listview structure
* [I] fwKeys : key indicator
* [I]
pts
: mouse position
* [I]
x,y
: mouse position
*
* RETURN:
* 0 if the message is processed, non-zero if there was an error
*/
static
LRESULT
LISTVIEW_MouseMove
(
LISTVIEW_INFO
*
infoPtr
,
WORD
fwKeys
,
POINTS
pts
)
static
LRESULT
LISTVIEW_MouseMove
(
LISTVIEW_INFO
*
infoPtr
,
WORD
fwKeys
,
INT
x
,
INT
y
)
{
TRACKMOUSEEVENT
trackinfo
;
...
...
@@ -7960,22 +7960,22 @@ static LRESULT LISTVIEW_TrackMouse(LISTVIEW_INFO *infoPtr, POINT pt)
* PARAMETER(S):
* [I] infoPtr : valid pointer to the listview structure
* [I] wKey : key flag
* [I]
pts
: mouse coordinate
* [I]
x,y
: mouse coordinate
*
* RETURN:
* Zero
*/
static
LRESULT
LISTVIEW_LButtonDblClk
(
LISTVIEW_INFO
*
infoPtr
,
WORD
wKey
,
POINTS
pts
)
static
LRESULT
LISTVIEW_LButtonDblClk
(
LISTVIEW_INFO
*
infoPtr
,
WORD
wKey
,
INT
x
,
INT
y
)
{
LVHITTESTINFO
htInfo
;
TRACE
(
"(key=%hu, X=%hu, Y=%hu)
\n
"
,
wKey
,
pts
.
x
,
pts
.
y
);
TRACE
(
"(key=%hu, X=%hu, Y=%hu)
\n
"
,
wKey
,
x
,
y
);
/* send NM_RELEASEDCAPTURE notification */
notify
(
infoPtr
,
NM_RELEASEDCAPTURE
);
htInfo
.
pt
.
x
=
pts
.
x
;
htInfo
.
pt
.
y
=
pts
.
y
;
htInfo
.
pt
.
x
=
x
;
htInfo
.
pt
.
y
=
y
;
/* send NM_DBLCLK notification */
LISTVIEW_HitTest
(
infoPtr
,
&
htInfo
,
TRUE
,
FALSE
);
...
...
@@ -7994,19 +7994,19 @@ static LRESULT LISTVIEW_LButtonDblClk(LISTVIEW_INFO *infoPtr, WORD wKey, POINTS
* PARAMETER(S):
* [I] infoPtr : valid pointer to the listview structure
* [I] wKey : key flag
* [I]
pts
: mouse coordinate
* [I]
x,y
: mouse coordinate
*
* RETURN:
* Zero
*/
static
LRESULT
LISTVIEW_LButtonDown
(
LISTVIEW_INFO
*
infoPtr
,
WORD
wKey
,
POINTS
pts
)
static
LRESULT
LISTVIEW_LButtonDown
(
LISTVIEW_INFO
*
infoPtr
,
WORD
wKey
,
INT
x
,
INT
y
)
{
LVHITTESTINFO
lvHitTestInfo
;
static
BOOL
bGroupSelect
=
TRUE
;
POINT
pt
=
{
pts
.
x
,
pts
.
y
};
POINT
pt
=
{
x
,
y
};
INT
nItem
;
TRACE
(
"(key=%hu, X=%hu, Y=%hu)
\n
"
,
wKey
,
pts
.
x
,
pts
.
y
);
TRACE
(
"(key=%hu, X=%hu, Y=%hu)
\n
"
,
wKey
,
x
,
y
);
/* send NM_RELEASEDCAPTURE notification */
notify
(
infoPtr
,
NM_RELEASEDCAPTURE
);
...
...
@@ -8016,8 +8016,8 @@ static LRESULT LISTVIEW_LButtonDown(LISTVIEW_INFO *infoPtr, WORD wKey, POINTS pt
/* set left button down flag */
infoPtr
->
bLButtonDown
=
TRUE
;
lvHitTestInfo
.
pt
.
x
=
pts
.
x
;
lvHitTestInfo
.
pt
.
y
=
pts
.
y
;
lvHitTestInfo
.
pt
.
x
=
x
;
lvHitTestInfo
.
pt
.
y
=
y
;
nItem
=
LISTVIEW_HitTest
(
infoPtr
,
&
lvHitTestInfo
,
TRUE
,
TRUE
);
TRACE
(
"at %s, nItem=%d
\n
"
,
debugpoint
(
&
pt
),
nItem
);
...
...
@@ -8121,21 +8121,21 @@ static LRESULT LISTVIEW_LButtonDown(LISTVIEW_INFO *infoPtr, WORD wKey, POINTS pt
* PARAMETER(S):
* [I] infoPtr : valid pointer to the listview structure
* [I] wKey : key flag
* [I]
pts
: mouse coordinate
* [I]
x,y
: mouse coordinate
*
* RETURN:
* Zero
*/
static
LRESULT
LISTVIEW_LButtonUp
(
LISTVIEW_INFO
*
infoPtr
,
WORD
wKey
,
POINTS
pts
)
static
LRESULT
LISTVIEW_LButtonUp
(
LISTVIEW_INFO
*
infoPtr
,
WORD
wKey
,
INT
x
,
INT
y
)
{
LVHITTESTINFO
lvHitTestInfo
;
TRACE
(
"(key=%hu, X=%hu, Y=%hu)
\n
"
,
wKey
,
pts
.
x
,
pts
.
y
);
TRACE
(
"(key=%hu, X=%hu, Y=%hu)
\n
"
,
wKey
,
x
,
y
);
if
(
!
infoPtr
->
bLButtonDown
)
return
0
;
lvHitTestInfo
.
pt
.
x
=
pts
.
x
;
lvHitTestInfo
.
pt
.
y
=
pts
.
y
;
lvHitTestInfo
.
pt
.
x
=
x
;
lvHitTestInfo
.
pt
.
y
=
y
;
/* send NM_CLICK notification */
LISTVIEW_HitTest
(
infoPtr
,
&
lvHitTestInfo
,
TRUE
,
FALSE
);
...
...
@@ -8353,23 +8353,23 @@ static LRESULT LISTVIEW_Paint(LISTVIEW_INFO *infoPtr, HDC hdc)
* PARAMETER(S):
* [I] infoPtr : valid pointer to the listview structure
* [I] wKey : key flag
* [I]
pts
: mouse coordinate
* [I]
x,y
: mouse coordinate
*
* RETURN:
* Zero
*/
static
LRESULT
LISTVIEW_RButtonDblClk
(
LISTVIEW_INFO
*
infoPtr
,
WORD
wKey
,
POINTS
pts
)
static
LRESULT
LISTVIEW_RButtonDblClk
(
LISTVIEW_INFO
*
infoPtr
,
WORD
wKey
,
INT
x
,
INT
y
)
{
LVHITTESTINFO
lvHitTestInfo
;
TRACE
(
"(key=%hu,X=%hu,Y=%hu)
\n
"
,
wKey
,
pts
.
x
,
pts
.
y
);
TRACE
(
"(key=%hu,X=%hu,Y=%hu)
\n
"
,
wKey
,
x
,
y
);
/* send NM_RELEASEDCAPTURE notification */
notify
(
infoPtr
,
NM_RELEASEDCAPTURE
);
/* send NM_RDBLCLK notification */
lvHitTestInfo
.
pt
.
x
=
pts
.
x
;
lvHitTestInfo
.
pt
.
y
=
pts
.
y
;
lvHitTestInfo
.
pt
.
x
=
x
;
lvHitTestInfo
.
pt
.
y
=
y
;
LISTVIEW_HitTest
(
infoPtr
,
&
lvHitTestInfo
,
TRUE
,
FALSE
);
notify_click
(
infoPtr
,
NM_RDBLCLK
,
&
lvHitTestInfo
);
...
...
@@ -8383,17 +8383,17 @@ static LRESULT LISTVIEW_RButtonDblClk(LISTVIEW_INFO *infoPtr, WORD wKey, POINTS
* PARAMETER(S):
* [I] infoPtr : valid pointer to the listview structure
* [I] wKey : key flag
* [I]
pts
: mouse coordinate
* [I]
x,y
: mouse coordinate
*
* RETURN:
* Zero
*/
static
LRESULT
LISTVIEW_RButtonDown
(
LISTVIEW_INFO
*
infoPtr
,
WORD
wKey
,
POINTS
pts
)
static
LRESULT
LISTVIEW_RButtonDown
(
LISTVIEW_INFO
*
infoPtr
,
WORD
wKey
,
INT
x
,
INT
y
)
{
LVHITTESTINFO
lvHitTestInfo
;
INT
nItem
;
TRACE
(
"(key=%hu,X=%hu,Y=%hu)
\n
"
,
wKey
,
pts
.
x
,
pts
.
y
);
TRACE
(
"(key=%hu,X=%hu,Y=%hu)
\n
"
,
wKey
,
x
,
y
);
/* send NM_RELEASEDCAPTURE notification */
notify
(
infoPtr
,
NM_RELEASEDCAPTURE
);
...
...
@@ -8405,8 +8405,8 @@ static LRESULT LISTVIEW_RButtonDown(LISTVIEW_INFO *infoPtr, WORD wKey, POINTS pt
infoPtr
->
bRButtonDown
=
TRUE
;
/* determine the index of the selected item */
lvHitTestInfo
.
pt
.
x
=
pts
.
x
;
lvHitTestInfo
.
pt
.
y
=
pts
.
y
;
lvHitTestInfo
.
pt
.
x
=
x
;
lvHitTestInfo
.
pt
.
y
=
y
;
nItem
=
LISTVIEW_HitTest
(
infoPtr
,
&
lvHitTestInfo
,
TRUE
,
TRUE
);
if
((
nItem
>=
0
)
&&
(
nItem
<
infoPtr
->
nItemCount
))
...
...
@@ -8431,17 +8431,17 @@ static LRESULT LISTVIEW_RButtonDown(LISTVIEW_INFO *infoPtr, WORD wKey, POINTS pt
* PARAMETER(S):
* [I] infoPtr : valid pointer to the listview structure
* [I] wKey : key flag
* [I]
pts
: mouse coordinate
* [I]
x,y
: mouse coordinate
*
* RETURN:
* Zero
*/
static
LRESULT
LISTVIEW_RButtonUp
(
LISTVIEW_INFO
*
infoPtr
,
WORD
wKey
,
POINTS
pts
)
static
LRESULT
LISTVIEW_RButtonUp
(
LISTVIEW_INFO
*
infoPtr
,
WORD
wKey
,
INT
x
,
INT
y
)
{
LVHITTESTINFO
lvHitTestInfo
;
POINT
pt
;
TRACE
(
"(key=%hu,X=%hu,Y=%hu)
\n
"
,
wKey
,
pts
.
x
,
pts
.
y
);
TRACE
(
"(key=%hu,X=%hu,Y=%hu)
\n
"
,
wKey
,
x
,
y
);
if
(
!
infoPtr
->
bRButtonDown
)
return
0
;
...
...
@@ -8449,8 +8449,8 @@ static LRESULT LISTVIEW_RButtonUp(LISTVIEW_INFO *infoPtr, WORD wKey, POINTS pts)
infoPtr
->
bRButtonDown
=
FALSE
;
/* Send NM_RClICK notification */
lvHitTestInfo
.
pt
.
x
=
pts
.
x
;
lvHitTestInfo
.
pt
.
y
=
pts
.
y
;
lvHitTestInfo
.
pt
.
x
=
x
;
lvHitTestInfo
.
pt
.
y
=
y
;
LISTVIEW_HitTest
(
infoPtr
,
&
lvHitTestInfo
,
TRUE
,
FALSE
);
notify_click
(
infoPtr
,
NM_RCLICK
,
&
lvHitTestInfo
);
...
...
@@ -9168,19 +9168,19 @@ LISTVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return
LISTVIEW_KillFocus
(
infoPtr
);
case
WM_LBUTTONDBLCLK
:
return
LISTVIEW_LButtonDblClk
(
infoPtr
,
(
WORD
)
wParam
,
MAKEPOINTS
(
lParam
));
return
LISTVIEW_LButtonDblClk
(
infoPtr
,
(
WORD
)
wParam
,
(
SHORT
)
LOWORD
(
lParam
),
(
SHORT
)
HIWORD
(
lParam
));
case
WM_LBUTTONDOWN
:
return
LISTVIEW_LButtonDown
(
infoPtr
,
(
WORD
)
wParam
,
MAKEPOINTS
(
lParam
));
return
LISTVIEW_LButtonDown
(
infoPtr
,
(
WORD
)
wParam
,
(
SHORT
)
LOWORD
(
lParam
),
(
SHORT
)
HIWORD
(
lParam
));
case
WM_LBUTTONUP
:
return
LISTVIEW_LButtonUp
(
infoPtr
,
(
WORD
)
wParam
,
MAKEPOINTS
(
lParam
));
return
LISTVIEW_LButtonUp
(
infoPtr
,
(
WORD
)
wParam
,
(
SHORT
)
LOWORD
(
lParam
),
(
SHORT
)
HIWORD
(
lParam
));
case
WM_MOUSEMOVE
:
return
LISTVIEW_MouseMove
(
infoPtr
,
(
WORD
)
wParam
,
MAKEPOINTS
(
lParam
));
return
LISTVIEW_MouseMove
(
infoPtr
,
(
WORD
)
wParam
,
(
SHORT
)
LOWORD
(
lParam
),
(
SHORT
)
HIWORD
(
lParam
));
case
WM_MOUSEHOVER
:
return
LISTVIEW_MouseHover
(
infoPtr
,
(
WORD
)
wParam
,
MAKEPOINTS
(
lParam
));
return
LISTVIEW_MouseHover
(
infoPtr
,
(
WORD
)
wParam
,
(
SHORT
)
LOWORD
(
lParam
),
(
SHORT
)
HIWORD
(
lParam
));
case
WM_NCDESTROY
:
return
LISTVIEW_NCDestroy
(
infoPtr
);
...
...
@@ -9197,13 +9197,13 @@ LISTVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return
LISTVIEW_Paint
(
infoPtr
,
(
HDC
)
wParam
);
case
WM_RBUTTONDBLCLK
:
return
LISTVIEW_RButtonDblClk
(
infoPtr
,
(
WORD
)
wParam
,
MAKEPOINTS
(
lParam
));
return
LISTVIEW_RButtonDblClk
(
infoPtr
,
(
WORD
)
wParam
,
(
SHORT
)
LOWORD
(
lParam
),
(
SHORT
)
HIWORD
(
lParam
));
case
WM_RBUTTONDOWN
:
return
LISTVIEW_RButtonDown
(
infoPtr
,
(
WORD
)
wParam
,
MAKEPOINTS
(
lParam
));
return
LISTVIEW_RButtonDown
(
infoPtr
,
(
WORD
)
wParam
,
(
SHORT
)
LOWORD
(
lParam
),
(
SHORT
)
HIWORD
(
lParam
));
case
WM_RBUTTONUP
:
return
LISTVIEW_RButtonUp
(
infoPtr
,
(
WORD
)
wParam
,
MAKEPOINTS
(
lParam
));
return
LISTVIEW_RButtonUp
(
infoPtr
,
(
WORD
)
wParam
,
(
SHORT
)
LOWORD
(
lParam
),
(
SHORT
)
HIWORD
(
lParam
));
case
WM_SETCURSOR
:
if
(
LISTVIEW_SetCursor
(
infoPtr
,
(
HWND
)
wParam
,
LOWORD
(
lParam
),
HIWORD
(
lParam
)))
...
...
dlls/comctl32/rebar.c
View file @
a79c534c
...
...
@@ -194,8 +194,8 @@ typedef struct
HCURSOR
hcurVert
;
/* handle to the NS cursor */
HCURSOR
hcurDrag
;
/* handle to the drag cursor */
INT
iVersion
;
/* version number */
POINT
S
dragStart
;
/* x,y of button down */
POINT
S
dragNow
;
/* x,y of this MouseMove */
POINT
dragStart
;
/* x,y of button down */
POINT
dragNow
;
/* x,y of this MouseMove */
INT
iOldBand
;
/* last band that had the mouse cursor over it */
INT
ihitoffset
;
/* offset of hotspot from gripper.left */
POINT
origin
;
/* left/upper corner of client */
...
...
@@ -394,7 +394,7 @@ REBAR_DumpBand (REBAR_INFO *iP)
TRACE
(
"hwnd=%p: color=%08lx/%08lx, bands=%u, rows=%u, cSize=%ld,%ld
\n
"
,
iP
->
hwndSelf
,
iP
->
clrText
,
iP
->
clrBk
,
iP
->
uNumBands
,
iP
->
uNumRows
,
iP
->
calcSize
.
cx
,
iP
->
calcSize
.
cy
);
TRACE
(
"hwnd=%p: flags=%08x, dragStart=%
d,%d, dragNow=%d,%
d, iGrabbedBand=%d
\n
"
,
TRACE
(
"hwnd=%p: flags=%08x, dragStart=%
ld,%ld, dragNow=%ld,%l
d, iGrabbedBand=%d
\n
"
,
iP
->
hwndSelf
,
iP
->
fStatus
,
iP
->
dragStart
.
x
,
iP
->
dragStart
.
y
,
iP
->
dragNow
.
x
,
iP
->
dragNow
.
y
,
iP
->
iGrabbedBand
);
...
...
@@ -2418,7 +2418,7 @@ REBAR_Shrink (REBAR_INFO *infoPtr, REBAR_BAND *band, INT movement, INT i)
static
void
REBAR_HandleLRDrag
(
REBAR_INFO
*
infoPtr
,
POINTS
*
ptsmove
)
REBAR_HandleLRDrag
(
REBAR_INFO
*
infoPtr
,
const
POINT
*
ptsmove
)
/* Function: This will implement the functionality of a */
/* Gripper drag within a row. It will not implement "out- */
/* of-row" drags. (They are detected and handled in */
...
...
@@ -2491,7 +2491,7 @@ REBAR_HandleLRDrag (REBAR_INFO *infoPtr, POINTS *ptsmove)
infoPtr
->
ihitoffset
);
infoPtr
->
dragNow
=
*
ptsmove
;
TRACE
(
"before: movement=%d (%
d,%
d), imindBand=%d, ihitBand=%d, imaxdBand=%d, LSum=%d, RSum=%d
\n
"
,
TRACE
(
"before: movement=%d (%
ld,%l
d), imindBand=%d, ihitBand=%d, imaxdBand=%d, LSum=%d, RSum=%d
\n
"
,
movement
,
ptsmove
->
x
,
ptsmove
->
y
,
imindBand
,
ihitBand
,
imaxdBand
,
LHeaderSum
,
RHeaderSum
);
REBAR_DumpBand
(
infoPtr
);
...
...
@@ -3874,7 +3874,8 @@ REBAR_LButtonDown (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
infoPtr
->
iGrabbedBand
=
iHitBand
;
/* save off the LOWORD and HIWORD of lParam as initial x,y */
infoPtr
->
dragStart
=
MAKEPOINTS
(
lParam
);
infoPtr
->
dragStart
.
x
=
(
short
)
LOWORD
(
lParam
);
infoPtr
->
dragStart
.
y
=
(
short
)
HIWORD
(
lParam
);
infoPtr
->
dragNow
=
infoPtr
->
dragStart
;
if
(
infoPtr
->
dwStyle
&
CCS_VERT
)
infoPtr
->
ihitoffset
=
infoPtr
->
dragStart
.
y
-
(
lpBand
->
rcBand
.
top
+
REBAR_PRE_GRIPPER
);
...
...
@@ -3935,9 +3936,10 @@ static LRESULT
REBAR_MouseMove
(
REBAR_INFO
*
infoPtr
,
WPARAM
wParam
,
LPARAM
lParam
)
{
REBAR_BAND
*
lpChevronBand
;
POINT
S
ptsm
ove
;
POINT
ptM
ove
;
ptsmove
=
MAKEPOINTS
(
lParam
);
ptMove
.
x
=
(
short
)
LOWORD
(
lParam
);
ptMove
.
y
=
(
short
)
HIWORD
(
lParam
);
/* if we are currently dragging a band */
if
(
infoPtr
->
iGrabbedBand
>=
0
)
...
...
@@ -3951,40 +3953,37 @@ REBAR_MouseMove (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
band2
=
&
infoPtr
->
bands
[
infoPtr
->
iGrabbedBand
];
/* if mouse did not move much, exit */
if
((
abs
(
pt
sm
ove
.
x
-
infoPtr
->
dragNow
.
x
)
<=
mindragx
)
&&
(
abs
(
pt
sm
ove
.
y
-
infoPtr
->
dragNow
.
y
)
<=
mindragy
))
return
0
;
if
((
abs
(
pt
M
ove
.
x
-
infoPtr
->
dragNow
.
x
)
<=
mindragx
)
&&
(
abs
(
pt
M
ove
.
y
-
infoPtr
->
dragNow
.
y
)
<=
mindragy
))
return
0
;
/* Test for valid drag case - must not be first band in row */
if
(
infoPtr
->
dwStyle
&
CCS_VERT
)
{
if
((
pt
sm
ove
.
x
<
band2
->
rcBand
.
left
)
||
(
pt
sm
ove
.
x
>
band2
->
rcBand
.
right
)
||
if
((
pt
M
ove
.
x
<
band2
->
rcBand
.
left
)
||
(
pt
M
ove
.
x
>
band2
->
rcBand
.
right
)
||
((
infoPtr
->
iGrabbedBand
>
0
)
&&
(
band1
->
iRow
!=
band2
->
iRow
)))
{
FIXME
(
"Cannot drag to other rows yet!!
\n
"
);
}
else
{
REBAR_HandleLRDrag
(
infoPtr
,
&
pt
sm
ove
);
REBAR_HandleLRDrag
(
infoPtr
,
&
pt
M
ove
);
}
}
else
{
if
((
pt
sm
ove
.
y
<
band2
->
rcBand
.
top
)
||
(
pt
sm
ove
.
y
>
band2
->
rcBand
.
bottom
)
||
if
((
pt
M
ove
.
y
<
band2
->
rcBand
.
top
)
||
(
pt
M
ove
.
y
>
band2
->
rcBand
.
bottom
)
||
((
infoPtr
->
iGrabbedBand
>
0
)
&&
(
band1
->
iRow
!=
band2
->
iRow
)))
{
FIXME
(
"Cannot drag to other rows yet!!
\n
"
);
}
else
{
REBAR_HandleLRDrag
(
infoPtr
,
&
pt
sm
ove
);
REBAR_HandleLRDrag
(
infoPtr
,
&
pt
M
ove
);
}
}
}
else
{
POINT
ptMove
;
INT
iHitBand
;
UINT
htFlags
;
TRACKMOUSEEVENT
trackinfo
;
ptMove
.
x
=
(
INT
)
ptsmove
.
x
;
ptMove
.
y
=
(
INT
)
ptsmove
.
y
;
REBAR_InternalHitTest
(
infoPtr
,
&
ptMove
,
&
htFlags
,
&
iHitBand
);
if
(
infoPtr
->
iOldBand
>=
0
&&
infoPtr
->
iOldBand
==
infoPtr
->
ichevronhotBand
)
...
...
@@ -4152,8 +4151,7 @@ static LRESULT
REBAR_NCHitTest
(
REBAR_INFO
*
infoPtr
,
WPARAM
wParam
,
LPARAM
lParam
)
{
NMMOUSE
nmmouse
;
POINTS
shortpt
;
POINT
clpt
,
pt
;
POINT
clpt
;
INT
i
;
UINT
scrap
;
LRESULT
ret
=
HTCLIENT
;
...
...
@@ -4166,9 +4164,8 @@ REBAR_NCHitTest (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
* 3. native always seems to return HTCLIENT if notify return is 0.
*/
shortpt
=
MAKEPOINTS
(
lParam
);
POINTSTOPOINT
(
pt
,
shortpt
);
clpt
=
pt
;
clpt
.
x
=
(
short
)
LOWORD
(
lParam
);
clpt
.
y
=
(
short
)
HIWORD
(
lParam
);
ScreenToClient
(
infoPtr
->
hwndSelf
,
&
clpt
);
REBAR_InternalHitTest
(
infoPtr
,
&
clpt
,
&
scrap
,
(
INT
*
)
&
nmmouse
.
dwItemSpec
);
...
...
dlls/comctl32/syslink.c
View file @
a79c534c
...
...
@@ -1478,12 +1478,10 @@ static LRESULT WINAPI SysLinkWindowProc(HWND hwnd, UINT message,
case
WM_SETCURSOR
:
{
LHITTESTINFO
ht
;
POINTS
pt
;
DWORD
mp
=
GetMessagePos
();
pt
=
MAKEPOINTS
(
mp
);
ht
.
pt
.
x
=
pt
.
x
;
ht
.
pt
.
y
=
pt
.
y
;
ht
.
pt
.
x
=
(
short
)
LOWORD
(
mp
);
ht
.
pt
.
y
=
(
short
)
HIWORD
(
mp
);
ScreenToClient
(
infoPtr
->
Self
,
&
ht
.
pt
);
if
(
SYSLINK_HitTest
(
infoPtr
,
&
ht
))
...
...
dlls/comctl32/trackbar.c
View file @
a79c534c
...
...
@@ -1418,9 +1418,12 @@ TRACKBAR_KillFocus (TRACKBAR_INFO *infoPtr, HWND hwndGetFocus)
}
static
LRESULT
TRACKBAR_LButtonDown
(
TRACKBAR_INFO
*
infoPtr
,
DWORD
fwKeys
,
POINTS
pts
)
TRACKBAR_LButtonDown
(
TRACKBAR_INFO
*
infoPtr
,
DWORD
fwKeys
,
INT
x
,
INT
y
)
{
POINT
clickPoint
=
{
pts
.
x
,
pts
.
y
};
POINT
clickPoint
;
clickPoint
.
x
=
x
;
clickPoint
.
y
=
y
;
SetFocus
(
infoPtr
->
hwndSelf
);
...
...
@@ -1444,7 +1447,7 @@ TRACKBAR_LButtonDown (TRACKBAR_INFO *infoPtr, DWORD fwKeys, POINTS pts)
static
LRESULT
TRACKBAR_LButtonUp
(
TRACKBAR_INFO
*
infoPtr
,
DWORD
fwKeys
,
POINTS
pts
)
TRACKBAR_LButtonUp
(
TRACKBAR_INFO
*
infoPtr
,
DWORD
fwKeys
,
INT
x
,
INT
y
)
{
if
(
infoPtr
->
flags
&
TB_DRAG_MODE
)
{
notify_with_scroll
(
infoPtr
,
TB_THUMBPOSITION
|
(
infoPtr
->
lPos
<<
16
));
...
...
@@ -1526,17 +1529,18 @@ TRACKBAR_Timer (TRACKBAR_INFO *infoPtr, INT wTimerID, TIMERPROC *tmrpc)
static
LRESULT
TRACKBAR_MouseMove
(
TRACKBAR_INFO
*
infoPtr
,
DWORD
fwKeys
,
POINTS
pts
)
TRACKBAR_MouseMove
(
TRACKBAR_INFO
*
infoPtr
,
DWORD
fwKeys
,
INT
x
,
INT
y
)
{
DWORD
dwStyle
=
GetWindowLongW
(
infoPtr
->
hwndSelf
,
GWL_STYLE
);
INT
clickPlace
=
(
dwStyle
&
TBS_VERT
)
?
pts
.
y
:
pts
.
x
;
INT
clickPlace
=
(
dwStyle
&
TBS_VERT
)
?
y
:
x
;
LONG
dragPos
,
oldPos
=
infoPtr
->
lPos
;
TRACE
(
"(x=%d. y=%d)
\n
"
,
pts
.
x
,
pts
.
y
);
TRACE
(
"(x=%d. y=%d)
\n
"
,
x
,
y
);
if
(
infoPtr
->
flags
&
TB_AUTO_PAGE
)
{
POINT
pt
;
POINTSTOPOINT
(
pt
,
pts
);
pt
.
x
=
x
;
pt
.
y
=
y
;
TRACKBAR_AutoPage
(
infoPtr
,
pt
);
return
TRUE
;
}
...
...
@@ -1778,13 +1782,13 @@ TRACKBAR_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return
TRACKBAR_KillFocus
(
infoPtr
,
(
HWND
)
wParam
);
case
WM_LBUTTONDOWN
:
return
TRACKBAR_LButtonDown
(
infoPtr
,
wParam
,
MAKEPOINTS
(
lParam
));
return
TRACKBAR_LButtonDown
(
infoPtr
,
wParam
,
(
SHORT
)
LOWORD
(
lParam
),
(
SHORT
)
HIWORD
(
lParam
));
case
WM_LBUTTONUP
:
return
TRACKBAR_LButtonUp
(
infoPtr
,
wParam
,
MAKEPOINTS
(
lParam
));
return
TRACKBAR_LButtonUp
(
infoPtr
,
wParam
,
(
SHORT
)
LOWORD
(
lParam
),
(
SHORT
)
HIWORD
(
lParam
));
case
WM_MOUSEMOVE
:
return
TRACKBAR_MouseMove
(
infoPtr
,
wParam
,
MAKEPOINTS
(
lParam
));
return
TRACKBAR_MouseMove
(
infoPtr
,
wParam
,
(
SHORT
)
LOWORD
(
lParam
),
(
SHORT
)
HIWORD
(
lParam
));
case
WM_PAINT
:
return
TRACKBAR_Paint
(
infoPtr
,
(
HDC
)
wParam
);
...
...
dlls/comctl32/updown.c
View file @
a79c534c
...
...
@@ -650,10 +650,10 @@ static BOOL UPDOWN_CancelMode (UPDOWN_INFO *infoPtr)
* 'pt' is the location of the mouse event in client or
* windows coordinates.
*/
static
void
UPDOWN_HandleMouseEvent
(
UPDOWN_INFO
*
infoPtr
,
UINT
msg
,
POINTS
pts
)
static
void
UPDOWN_HandleMouseEvent
(
UPDOWN_INFO
*
infoPtr
,
UINT
msg
,
INT
x
,
INT
y
)
{
DWORD
dwStyle
=
GetWindowLongW
(
infoPtr
->
Self
,
GWL_STYLE
);
POINT
pt
=
{
pts
.
x
,
pts
.
y
};
POINT
pt
=
{
x
,
y
};
RECT
rect
;
int
temp
,
arrow
;
...
...
@@ -840,7 +840,7 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam, L
case
WM_LBUTTONDOWN
:
case
WM_MOUSEMOVE
:
if
(
UPDOWN_IsEnabled
(
infoPtr
))
UPDOWN_HandleMouseEvent
(
infoPtr
,
message
,
MAKEPOINTS
(
lParam
));
UPDOWN_HandleMouseEvent
(
infoPtr
,
message
,
(
SHORT
)
LOWORD
(
lParam
),
(
SHORT
)
HIWORD
(
lParam
));
break
;
case
WM_KEYDOWN
:
...
...
programs/regedit/listview.c
View file @
a79c534c
...
...
@@ -369,10 +369,10 @@ static LRESULT CALLBACK ListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPAR
}
break
;
case
WM_CONTEXTMENU
:
{
POINTS
pt
=
MAKEPOINTS
(
lParam
);
int
cnt
=
ListView_GetNextItem
(
hWnd
,
-
1
,
LVNI_SELECTED
);
TrackPopupMenu
(
GetSubMenu
(
hPopupMenus
,
cnt
==
-
1
?
PM_NEW
:
PM_MODIFYVALUE
),
TPM_RIGHTBUTTON
,
pt
.
x
,
pt
.
y
,
0
,
hFrameWnd
,
NULL
);
TrackPopupMenu
(
GetSubMenu
(
hPopupMenus
,
cnt
==
-
1
?
PM_NEW
:
PM_MODIFYVALUE
),
TPM_RIGHTBUTTON
,
(
short
)
LOWORD
(
lParam
),
(
short
)
HIWORD
(
lParam
),
0
,
hFrameWnd
,
NULL
);
break
;
}
default:
...
...
programs/winefile/winefile.c
View file @
a79c534c
...
...
@@ -3667,8 +3667,9 @@ LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam
/* first select the current item in the listbox */
HWND
hpanel
=
(
HWND
)
wparam
;
POINTS
*
ppos
=
&
MAKEPOINTS
(
lparam
);
POINT
pt
;
POINTSTOPOINT
(
pt
,
*
ppos
);
POINT
pt
;
pt
.
x
=
(
short
)
LOWORD
(
lparam
);
pt
.
y
=
(
short
)
HIWORD
(
lparam
);
ScreenToClient
(
hpanel
,
&
pt
);
SendMessage
(
hpanel
,
WM_LBUTTONDOWN
,
0
,
MAKELONG
(
pt
.
x
,
pt
.
y
));
SendMessage
(
hpanel
,
WM_LBUTTONUP
,
0
,
MAKELONG
(
pt
.
x
,
pt
.
y
));
...
...
@@ -3689,7 +3690,7 @@ LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam
/* get and use the parent folder to display correct context menu in all cases */
if
(
SUCCEEDED
(
SHBindToParent
(
pidl_abs
,
&
IID_IShellFolder
,
(
LPVOID
*
)
&
parentFolder
,
&
pidlLast
)))
{
hr
=
ShellFolderContextMenu
(
parentFolder
,
hwnd
,
1
,
&
pidlLast
,
p
pos
->
x
,
ppos
->
y
);
hr
=
ShellFolderContextMenu
(
parentFolder
,
hwnd
,
1
,
&
pidlLast
,
p
t
.
x
,
pt
.
y
);
(
*
parentFolder
->
lpVtbl
->
Release
)(
parentFolder
);
}
...
...
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