user32: Use BOOL type where appropriate.

This commit is contained in:
Frédéric Delanoy 2013-11-05 01:05:02 +01:00 committed by Alexandre Julliard
parent 3cb2ddfd09
commit 77ee42fd33
5 changed files with 20 additions and 20 deletions

View file

@ -844,13 +844,13 @@ static BOOL MDI_AugmentFrameMenu( HWND frame, HWND hChild )
TRACE("frame %p,child %p\n",frame,hChild);
if( !menu ) return 0;
if (!menu) return FALSE;
/* create a copy of sysmenu popup and insert it into frame menu bar */
if (!(hSysPopup = GetSystemMenu(hChild, FALSE)))
{
TRACE("child %p doesn't have a system menu\n", hChild);
return 0;
return FALSE;
}
AppendMenuW(menu, MF_HELP | MF_BITMAP,
@ -898,7 +898,7 @@ static BOOL MDI_AugmentFrameMenu( HWND frame, HWND hChild )
{
TRACE("not inserted\n");
DestroyMenu(hSysPopup);
return 0;
return FALSE;
}
EnableMenuItem(hSysPopup, SC_SIZE, MF_BYCOMMAND | MF_GRAYED);
@ -909,7 +909,7 @@ static BOOL MDI_AugmentFrameMenu( HWND frame, HWND hChild )
/* redraw menu */
DrawMenuBar(frame);
return 1;
return TRUE;
}
/**********************************************************************
@ -924,13 +924,13 @@ static BOOL MDI_RestoreFrameMenu( HWND frame, HWND hChild )
TRACE("frame %p, child %p\n", frame, hChild);
if( !menu ) return 0;
if (!menu) return FALSE;
/* if there is no system buttons then nothing to do */
nItems = GetMenuItemCount(menu) - 1;
iId = GetMenuItemID(menu, nItems);
if ( !(iId == SC_RESTORE || iId == SC_CLOSE) )
return 0;
return FALSE;
/*
* Remove the system menu, If that menu is the icon of the window
@ -963,7 +963,7 @@ static BOOL MDI_RestoreFrameMenu( HWND frame, HWND hChild )
DrawMenuBar(frame);
return 1;
return TRUE;
}
@ -1665,7 +1665,7 @@ BOOL WINAPI TranslateMDISysAccel( HWND hwndClient, LPMSG msg )
MDICLIENTINFO *ci = get_client_info( hwndClient );
WPARAM wParam = 0;
if (!ci || !IsWindowEnabled(ci->hwndActiveChild)) return 0;
if (!ci || !IsWindowEnabled(ci->hwndActiveChild)) return FALSE;
/* translate if the Ctrl key is down and Alt not. */
@ -1686,14 +1686,14 @@ BOOL WINAPI TranslateMDISysAccel( HWND hwndClient, LPMSG msg )
}
/* fall through */
default:
return 0;
return FALSE;
}
TRACE("wParam = %04lx\n", wParam);
SendMessageW(ci->hwndActiveChild, WM_SYSCOMMAND, wParam, msg->wParam);
return 1;
return TRUE;
}
}
return 0; /* failure */
return FALSE; /* failure */
}
/***********************************************************************

View file

@ -1172,7 +1172,7 @@ static void MENU_PopupMenuCalcSize( LPPOPUPMENU lppop )
MENUITEM *lpitem;
HDC hdc;
UINT start, i;
int textandbmp = FALSE;
BOOL textandbmp = FALSE;
int orgX, orgY, maxX, maxTab, maxTabWidth, maxHeight;
lppop->Width = lppop->Height = 0;
@ -1591,7 +1591,7 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
HBITMAP bm;
INT y = rect.top + rect.bottom;
RECT rc = rect;
int checked = FALSE;
BOOL checked = FALSE;
UINT check_bitmap_width = GetSystemMetrics( SM_CXMENUCHECK );
UINT check_bitmap_height = GetSystemMetrics( SM_CYMENUCHECK );
/* Draw the check mark

View file

@ -422,14 +422,14 @@ static const unsigned int message_unicode_flags[] =
};
/* check whether a given message type includes pointers */
static inline int is_pointer_message( UINT message )
static inline BOOL is_pointer_message( UINT message )
{
if (message >= 8*sizeof(message_pointer_flags)) return FALSE;
return (message_pointer_flags[message / 32] & SET(message)) != 0;
}
/* check whether a given message type contains Unicode (or ASCII) chars */
static inline int is_unicode_message( UINT message )
static inline BOOL is_unicode_message( UINT message )
{
if (message >= 8*sizeof(message_unicode_flags)) return FALSE;
return (message_unicode_flags[message / 32] & SET(message)) != 0;

View file

@ -458,7 +458,7 @@ void WINAPI RegisterSystemThread(DWORD flags, DWORD reserved)
BOOL WINAPI RegisterShellHookWindow ( HWND hWnd )
{
FIXME("(%p): stub\n", hWnd);
return 0;
return FALSE;
}

View file

@ -3478,7 +3478,7 @@ BOOL WINAPI SetWindowContextHelpId( HWND hwnd, DWORD id )
if (wnd == WND_OTHER_PROCESS)
{
if (IsWindow( hwnd )) FIXME( "not supported on other process window %p\n", hwnd );
return 0;
return FALSE;
}
wnd->helpContext = id;
WIN_ReleasePtr( wnd );
@ -3511,7 +3511,7 @@ BOOL WINAPI DragDetect( HWND hWnd, POINT pt )
if( msg.message == WM_LBUTTONUP )
{
ReleaseCapture();
return 0;
return FALSE;
}
if( msg.message == WM_MOUSEMOVE )
{
@ -3521,13 +3521,13 @@ BOOL WINAPI DragDetect( HWND hWnd, POINT pt )
if( !PtInRect( &rect, tmp ))
{
ReleaseCapture();
return 1;
return TRUE;
}
}
}
WaitMessage();
}
return 0;
return FALSE;
}
/******************************************************************************