comctl32: Rename the dwStyle and dwOldStyle variables in LISTVIEW_SetExtendedListViewStyle to more accurately reflect their purpose.

This also fixes local variable shadowing in the function, which should 
be avoided for purposes of code readability.
This commit is contained in:
Rob Shearman 2008-02-22 19:17:13 +00:00 committed by Alexandre Julliard
parent 45f13cefc4
commit 7f33e95ca7
1 changed files with 7 additions and 7 deletions

View File

@ -6985,17 +6985,17 @@ static HIMAGELIST LISTVIEW_CreateCheckBoxIL(const LISTVIEW_INFO *infoPtr)
* SUCCESS : previous style
* FAILURE : 0
*/
static DWORD LISTVIEW_SetExtendedListViewStyle(LISTVIEW_INFO *infoPtr, DWORD dwMask, DWORD dwStyle)
static DWORD LISTVIEW_SetExtendedListViewStyle(LISTVIEW_INFO *infoPtr, DWORD dwMask, DWORD dwExStyle)
{
DWORD dwOldStyle = infoPtr->dwLvExStyle;
DWORD dwOldExStyle = infoPtr->dwLvExStyle;
/* set new style */
if (dwMask)
infoPtr->dwLvExStyle = (dwOldStyle & ~dwMask) | (dwStyle & dwMask);
infoPtr->dwLvExStyle = (dwOldExStyle & ~dwMask) | (dwExStyle & dwMask);
else
infoPtr->dwLvExStyle = dwStyle;
infoPtr->dwLvExStyle = dwExStyle;
if((infoPtr->dwLvExStyle ^ dwOldStyle) & LVS_EX_CHECKBOXES)
if((infoPtr->dwLvExStyle ^ dwOldExStyle) & LVS_EX_CHECKBOXES)
{
HIMAGELIST himl = 0;
if(infoPtr->dwLvExStyle & LVS_EX_CHECKBOXES)
@ -7011,7 +7011,7 @@ static DWORD LISTVIEW_SetExtendedListViewStyle(LISTVIEW_INFO *infoPtr, DWORD dwM
LISTVIEW_SetImageList(infoPtr, LVSIL_STATE, himl);
}
if((infoPtr->dwLvExStyle ^ dwOldStyle) & LVS_EX_HEADERDRAGDROP)
if((infoPtr->dwLvExStyle ^ dwOldExStyle) & LVS_EX_HEADERDRAGDROP)
{
DWORD dwStyle = GetWindowLongW(infoPtr->hwndHeader, GWL_STYLE);
if (infoPtr->dwLvExStyle & LVS_EX_HEADERDRAGDROP)
@ -7021,7 +7021,7 @@ static DWORD LISTVIEW_SetExtendedListViewStyle(LISTVIEW_INFO *infoPtr, DWORD dwM
SetWindowLongW(infoPtr->hwndHeader, GWL_STYLE, dwStyle);
}
return dwOldStyle;
return dwOldExStyle;
}
/***