user32: Avoid TRUE:FALSE conditional expressions.

This commit is contained in:
Michael Stefaniuc 2012-08-08 10:15:09 +02:00 committed by Alexandre Julliard
parent 43ae84636a
commit 4affaea0ba
8 changed files with 12 additions and 12 deletions

View File

@ -2111,7 +2111,7 @@ LRESULT ComboWndProc_common( HWND hwnd, UINT message, WPARAM wParam, LPARAM lPar
if( lParam ) CBGetDroppedControlRect(lphc, (LPRECT)lParam );
return CB_OKAY;
case CB_GETDROPPEDSTATE:
return (lphc->wState & CBF_DROPPED) ? TRUE : FALSE;
return (lphc->wState & CBF_DROPPED) != 0;
case CB_DIR:
return unicode ? SendMessageW(lphc->hWndLBox, LB_DIR, wParam, lParam) :
SendMessageA(lphc->hWndLBox, LB_DIR, wParam, lParam);
@ -2173,7 +2173,7 @@ LRESULT ComboWndProc_common( HWND hwnd, UINT message, WPARAM wParam, LPARAM lPar
else lphc->wState &= ~CBF_EUI;
return CB_OKAY;
case CB_GETEXTENDEDUI:
return (lphc->wState & CBF_EUI) ? TRUE : FALSE;
return (lphc->wState & CBF_EUI) != 0;
case CB_GETCOMBOBOXINFO:
return COMBO_GetComboBoxInfo(lphc, (COMBOBOXINFO *)lParam);
case CB_LIMITTEXT:

View File

@ -321,8 +321,8 @@ static WDML_XACT* WDML_ClientQueueAdvise(WDML_CONV* pConv, UINT wType, UINT wFmt
/* pack DdeAdvise */
pDdeAdvise = GlobalLock(pXAct->hMem);
pDdeAdvise->fAckReq = (wType & XTYPF_ACKREQ) ? TRUE : FALSE;
pDdeAdvise->fDeferUpd = (wType & XTYPF_NODATA) ? TRUE : FALSE;
pDdeAdvise->fAckReq = (wType & XTYPF_ACKREQ) != 0;
pDdeAdvise->fDeferUpd = (wType & XTYPF_NODATA) != 0;
pDdeAdvise->cfFormat = wFmt;
GlobalUnlock(pXAct->hMem);
@ -857,7 +857,7 @@ static WDML_QUEUE_STATE WDML_HandleIncomingData(WDML_CONV* pConv, MSG* msg, HDDE
* XTYP_ADVDATA and callback should return the proper status.
*/
pLink = WDML_FindLink(pConv->instance, (HCONV)pConv, WDML_CLIENT_SIDE, hsz,
uiLo ? TRUE : FALSE, wdh.cfFormat);
uiLo != 0, wdh.cfFormat);
if (!pLink)
{
WDML_DecHSZ(pConv->instance, hsz);

View File

@ -2147,7 +2147,7 @@ static BOOL WDML_EnableCallback(WDML_CONV *pConv, UINT wCmd)
}
if (wCmd == EC_QUERYWAITING)
return pConv->transactions ? TRUE : FALSE;
return pConv->transactions != NULL;
if (wCmd != EC_ENABLEALL && wCmd != EC_ENABLEONE)
{

View File

@ -3387,7 +3387,7 @@ static BOOL EDIT_CheckCombo(EDITSTATE *es, UINT msg, INT key)
case WM_SYSKEYDOWN: /* Handle Alt+up/down arrows */
if (nEUI)
SendMessageW(hCombo, CB_SHOWDROPDOWN, bDropped ? FALSE : TRUE, 0);
SendMessageW(hCombo, CB_SHOWDROPDOWN, !bDropped, 0);
else
SendMessageW(hLBox, WM_KEYDOWN, VK_F4, 0);
break;

View File

@ -695,7 +695,7 @@ static void LISTBOX_DrawFocusRect( LB_DESCR *descr, BOOL on )
if (!IsWindowEnabled(descr->self))
SetTextColor( hdc, GetSysColor( COLOR_GRAYTEXT ) );
SetWindowOrgEx( hdc, descr->horz_pos, 0, NULL );
LISTBOX_PaintItem( descr, hdc, &rect, descr->focus_item, ODA_FOCUS, on ? FALSE : TRUE );
LISTBOX_PaintItem( descr, hdc, &rect, descr->focus_item, ODA_FOCUS, !on );
if (oldFont) SelectObject( hdc, oldFont );
ReleaseDC( descr->self, hdc );
}
@ -2493,7 +2493,7 @@ static BOOL LISTBOX_Create( HWND hwnd, LPHEADCOMBO lphc )
descr->horz_pos = 0;
descr->nb_tabs = 0;
descr->tabs = NULL;
descr->caret_on = lphc ? FALSE : TRUE;
descr->caret_on = !lphc;
if (descr->style & LBS_NOSEL) descr->caret_on = FALSE;
descr->in_focus = FALSE;
descr->captured = FALSE;

View File

@ -3125,7 +3125,7 @@ static BOOL MENU_TrackMenu( HMENU hmenu, UINT wFlags, INT x, INT y,
/* if the function was called by TrackPopupMenu, continue
with the menu tracking. If not, stop it */
else
fEndMenu = ((wFlags & TPM_POPUPMENU) ? FALSE : TRUE);
fEndMenu = !(wFlags & TPM_POPUPMENU);
break;

View File

@ -2063,7 +2063,7 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
WINE_SPI_FIXME(SPI_SETICONS); /* 88 WINVER >= 0x400 */
case SPI_GETDEFAULTINPUTLANG: /* 89 WINVER >= 0x400 */
ret = GetKeyboardLayout(0) ? TRUE : FALSE;
ret = GetKeyboardLayout(0) != 0;
break;
WINE_SPI_FIXME(SPI_SETDEFAULTINPUTLANG); /* 90 WINVER >= 0x400 */

View File

@ -1172,7 +1172,7 @@ static void test_shell_window(void)
ok(!ret, "third call to SetShellWindow(hwnd1)\n"); */
SetWindowLong(hwnd1, GWL_EXSTYLE, GetWindowLong(hwnd1,GWL_EXSTYLE)|WS_EX_TOPMOST);
ret = GetWindowLong(hwnd1,GWL_EXSTYLE)&WS_EX_TOPMOST? TRUE: FALSE;
ret = (GetWindowLong(hwnd1,GWL_EXSTYLE) & WS_EX_TOPMOST) != 0;
ok(!ret, "SetWindowExStyle(hwnd1, WS_EX_TOPMOST)\n");
ret = DestroyWindow(hwnd1);