comctl32/listview: Use defined name instead of magic value.

This commit is contained in:
Nikolay Sivov 2015-03-29 10:21:16 +03:00 committed by Alexandre Julliard
parent 9fcfaaa64a
commit d12c2f8b6f

View file

@ -8340,9 +8340,10 @@ static BOOL LISTVIEW_SetColumnWidth(LISTVIEW_INFO *infoPtr, INT nColumn, INT cx)
/* set column width only if in report or list mode */ /* set column width only if in report or list mode */
if (infoPtr->uView != LV_VIEW_DETAILS && infoPtr->uView != LV_VIEW_LIST) return FALSE; if (infoPtr->uView != LV_VIEW_DETAILS && infoPtr->uView != LV_VIEW_LIST) return FALSE;
/* take care of invalid cx values */ /* take care of invalid cx values - LVSCW_AUTOSIZE_* values are negative,
if(infoPtr->uView == LV_VIEW_DETAILS && cx < -2) cx = LVSCW_AUTOSIZE; with _USEHEADER being the lowest */
else if (infoPtr->uView == LV_VIEW_LIST && cx < 1) return FALSE; if (infoPtr->uView == LV_VIEW_DETAILS && cx < LVSCW_AUTOSIZE_USEHEADER) cx = LVSCW_AUTOSIZE;
else if (infoPtr->uView == LV_VIEW_LIST && cx <= 0) return FALSE;
/* resize all columns if in LV_VIEW_LIST mode */ /* resize all columns if in LV_VIEW_LIST mode */
if(infoPtr->uView == LV_VIEW_LIST) if(infoPtr->uView == LV_VIEW_LIST)