comctl32: Avoid TRUE:FALSE conditional expressions.

This commit is contained in:
Michael Stefaniuc 2012-08-08 21:00:22 +02:00 committed by Alexandre Julliard
parent 11d35ef8e7
commit 175eaf1074
6 changed files with 7 additions and 7 deletions

View File

@ -720,7 +720,7 @@ COMBOEX_SetExtendedStyle (COMBOEX_INFO *infoPtr, DWORD mask, DWORD style)
/* see if we need to change the word break proc on the edit */
if ((infoPtr->dwExtStyle ^ dwTemp) & CBES_EX_PATHWORDBREAKPROC)
SetPathWordBreakProc(infoPtr->hwndEdit,
(infoPtr->dwExtStyle & CBES_EX_PATHWORDBREAKPROC) ? TRUE : FALSE);
(infoPtr->dwExtStyle & CBES_EX_PATHWORDBREAKPROC) != 0);
/* test if the control's appearance has changed */
mask = CBES_EX_NOEDITIMAGE | CBES_EX_NOEDITIMAGEINDENT;

View File

@ -586,7 +586,7 @@ DATETIME_IncreaseField (DATETIME_INFO *infoPtr, int number, int delta)
/* Ensure time is within bounds */
limits = SendMessageW (infoPtr->hMonthCal, MCM_GETRANGE, 0, (LPARAM) &range);
min = ((delta < 0) ? TRUE : FALSE);
min = delta < 0;
if (limits & (min ? GDTR_MIN : GDTR_MAX))
{

View File

@ -372,7 +372,7 @@ static BOOL MONTHCAL_IsDateInValidRange(const MONTHCAL_INFO *infoPtr,
date->wMonth = fix_st->wMonth;
}
return fix_st ? FALSE : TRUE;
return !fix_st;
}
/* Checks passed range width with configured maximum selection count
@ -1276,7 +1276,7 @@ MONTHCAL_SetColor(MONTHCAL_INFO *infoPtr, UINT index, COLORREF color)
infoPtr->pens[PenText] = CreatePen(PS_SOLID, 1, infoPtr->colors[index]);
}
InvalidateRect(infoPtr->hwndSelf, NULL, index == MCSC_BACKGROUND ? TRUE : FALSE);
InvalidateRect(infoPtr->hwndSelf, NULL, index == MCSC_BACKGROUND);
return prev;
}

View File

@ -619,7 +619,7 @@ static BOOL allocate_storage(struct my_IStream *my_is, ULONG add)
else
my_is->iml_data = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, my_is->iml_data, my_is->iml_data_size);
return my_is->iml_data ? TRUE : FALSE;
return my_is->iml_data != NULL;
}
static HRESULT STDMETHODCALLTYPE Test_Stream_Write(IStream *iface, const void *pv, ULONG cb,

View File

@ -3140,7 +3140,7 @@ TOOLBAR_CheckButton (TOOLBAR_INFO *infoPtr, INT Id, LPARAM lParam)
btnPtr = &infoPtr->buttons[nIndex];
bChecked = (btnPtr->fsState & TBSTATE_CHECKED) ? TRUE : FALSE;
bChecked = (btnPtr->fsState & TBSTATE_CHECKED) != 0;
if (LOWORD(lParam) == FALSE)
btnPtr->fsState &= ~TBSTATE_CHECKED;

View File

@ -1612,7 +1612,7 @@ TREEVIEW_DeleteItem(TREEVIEW_INFO *infoPtr, HTREEITEM item)
static LRESULT
TREEVIEW_SetRedraw(TREEVIEW_INFO* infoPtr, WPARAM wParam)
{
infoPtr->bRedraw = wParam ? TRUE : FALSE;
infoPtr->bRedraw = wParam != 0;
if (infoPtr->bRedraw)
{