comctl32/rebar: Moved drag notify code into REBAR_MouseMove.
This commit is contained in:
parent
ebadd4ec46
commit
53284d2a18
|
@ -2044,20 +2044,6 @@ REBAR_HandleLRDrag (REBAR_INFO *infoPtr, const POINT *ptsmove)
|
|||
INT movement, xBand, cxLeft = 0;
|
||||
BOOL shrunkBands = FALSE;
|
||||
|
||||
/* on first significant mouse movement, issue notify */
|
||||
if (!(infoPtr->fStatus & BEGIN_DRAG_ISSUED)) {
|
||||
if (REBAR_Notify_NMREBAR (infoPtr, -1, RBN_BEGINDRAG)) {
|
||||
/* Notify returned TRUE - abort drag */
|
||||
infoPtr->dragStart.x = 0;
|
||||
infoPtr->dragStart.y = 0;
|
||||
infoPtr->dragNow = infoPtr->dragStart;
|
||||
infoPtr->iGrabbedBand = -1;
|
||||
ReleaseCapture ();
|
||||
return ;
|
||||
}
|
||||
infoPtr->fStatus |= BEGIN_DRAG_ISSUED;
|
||||
}
|
||||
|
||||
iHitBand = infoPtr->iGrabbedBand;
|
||||
iRowBegin = get_row_begin_for_band(infoPtr, iHitBand);
|
||||
iRowEnd = get_row_end_for_band(infoPtr, iHitBand);
|
||||
|
@ -3095,6 +3081,20 @@ REBAR_MouseMove (REBAR_INFO *infoPtr, LPARAM lParam)
|
|||
if ((abs(ptMove.x - infoPtr->dragNow.x) <= mindragx) &&
|
||||
(abs(ptMove.y - infoPtr->dragNow.y) <= mindragy)) return 0;
|
||||
|
||||
/* on first significant mouse movement, issue notify */
|
||||
if (!(infoPtr->fStatus & BEGIN_DRAG_ISSUED)) {
|
||||
if (REBAR_Notify_NMREBAR (infoPtr, -1, RBN_BEGINDRAG)) {
|
||||
/* Notify returned TRUE - abort drag */
|
||||
infoPtr->dragStart.x = 0;
|
||||
infoPtr->dragStart.y = 0;
|
||||
infoPtr->dragNow = infoPtr->dragStart;
|
||||
infoPtr->iGrabbedBand = -1;
|
||||
ReleaseCapture ();
|
||||
return 0;
|
||||
}
|
||||
infoPtr->fStatus |= BEGIN_DRAG_ISSUED;
|
||||
}
|
||||
|
||||
/* Test for valid drag case - must not be first band in row */
|
||||
if ((yPtMove < band->rcBand.top) ||
|
||||
(yPtMove > band->rcBand.bottom)) {
|
||||
|
|
Loading…
Reference in New Issue