comctl32: header: Remove the nOldWidth.
This commit is contained in:
parent
bd7f9321a0
commit
e4f3689513
|
@ -84,7 +84,6 @@ typedef struct
|
||||||
INT iMoveItem; /* index of tracked item. (Tracking mode) */
|
INT iMoveItem; /* index of tracked item. (Tracking mode) */
|
||||||
INT xTrackOffset; /* distance between the right side of the tracked item and the cursor */
|
INT xTrackOffset; /* distance between the right side of the tracked item and the cursor */
|
||||||
INT xOldTrack; /* track offset (see above) after the last WM_MOUSEMOVE */
|
INT xOldTrack; /* track offset (see above) after the last WM_MOUSEMOVE */
|
||||||
INT nOldWidth; /* width of a sizing item after the last WM_MOUSEMOVE */
|
|
||||||
INT iHotItem; /* index of hot item (cursor is over this item) */
|
INT iHotItem; /* index of hot item (cursor is over this item) */
|
||||||
INT iHotDivider; /* index of the hot divider (used while dragging an item or by HDM_SETHOTDIVIDER) */
|
INT iHotDivider; /* index of the hot divider (used while dragging an item or by HDM_SETHOTDIVIDER) */
|
||||||
INT iMargin; /* width of the margin that surrounds a bitmap */
|
INT iMargin; /* width of the margin that surrounds a bitmap */
|
||||||
|
@ -1581,7 +1580,6 @@ HEADER_LButtonDown (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
infoPtr->bCaptured = TRUE;
|
infoPtr->bCaptured = TRUE;
|
||||||
infoPtr->bTracking = TRUE;
|
infoPtr->bTracking = TRUE;
|
||||||
infoPtr->iMoveItem = nItem;
|
infoPtr->iMoveItem = nItem;
|
||||||
infoPtr->nOldWidth = iCurrWidth;
|
|
||||||
infoPtr->xTrackOffset = infoPtr->items[nItem].rect.right - pt.x;
|
infoPtr->xTrackOffset = infoPtr->items[nItem].rect.right - pt.x;
|
||||||
|
|
||||||
if (!(dwStyle & HDS_FULLDRAG)) {
|
if (!(dwStyle & HDS_FULLDRAG)) {
|
||||||
|
@ -1674,11 +1672,8 @@ HEADER_LButtonUp (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
ReleaseDC (hwnd, hdc);
|
ReleaseDC (hwnd, hdc);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HEADER_SendNotifyWithIntFieldT(hwnd, HDN_ITEMCHANGINGW, infoPtr->iMoveItem, HDI_WIDTH, iNewWidth))
|
if (!HEADER_SendNotifyWithIntFieldT(hwnd, HDN_ITEMCHANGINGW, infoPtr->iMoveItem, HDI_WIDTH, iNewWidth))
|
||||||
{
|
{
|
||||||
infoPtr->items[infoPtr->iMoveItem].cxy = infoPtr->nOldWidth;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
infoPtr->items[infoPtr->iMoveItem].cxy = iNewWidth;
|
infoPtr->items[infoPtr->iMoveItem].cxy = iNewWidth;
|
||||||
HEADER_SendNotifyWithIntFieldT(hwnd, HDN_ITEMCHANGEDW, infoPtr->iMoveItem, HDI_WIDTH, iNewWidth);
|
HEADER_SendNotifyWithIntFieldT(hwnd, HDN_ITEMCHANGEDW, infoPtr->iMoveItem, HDI_WIDTH, iNewWidth);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue