Commit 77ee42fd authored by Frédéric Delanoy's avatar Frédéric Delanoy Committed by Alexandre Julliard

user32: Use BOOL type where appropriate.

parent 3cb2ddfd
...@@ -844,13 +844,13 @@ static BOOL MDI_AugmentFrameMenu( HWND frame, HWND hChild ) ...@@ -844,13 +844,13 @@ static BOOL MDI_AugmentFrameMenu( HWND frame, HWND hChild )
TRACE("frame %p,child %p\n",frame,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 */ /* create a copy of sysmenu popup and insert it into frame menu bar */
if (!(hSysPopup = GetSystemMenu(hChild, FALSE))) if (!(hSysPopup = GetSystemMenu(hChild, FALSE)))
{ {
TRACE("child %p doesn't have a system menu\n", hChild); TRACE("child %p doesn't have a system menu\n", hChild);
return 0; return FALSE;
} }
AppendMenuW(menu, MF_HELP | MF_BITMAP, AppendMenuW(menu, MF_HELP | MF_BITMAP,
...@@ -898,7 +898,7 @@ static BOOL MDI_AugmentFrameMenu( HWND frame, HWND hChild ) ...@@ -898,7 +898,7 @@ static BOOL MDI_AugmentFrameMenu( HWND frame, HWND hChild )
{ {
TRACE("not inserted\n"); TRACE("not inserted\n");
DestroyMenu(hSysPopup); DestroyMenu(hSysPopup);
return 0; return FALSE;
} }
EnableMenuItem(hSysPopup, SC_SIZE, MF_BYCOMMAND | MF_GRAYED); EnableMenuItem(hSysPopup, SC_SIZE, MF_BYCOMMAND | MF_GRAYED);
...@@ -909,7 +909,7 @@ static BOOL MDI_AugmentFrameMenu( HWND frame, HWND hChild ) ...@@ -909,7 +909,7 @@ static BOOL MDI_AugmentFrameMenu( HWND frame, HWND hChild )
/* redraw menu */ /* redraw menu */
DrawMenuBar(frame); DrawMenuBar(frame);
return 1; return TRUE;
} }
/********************************************************************** /**********************************************************************
...@@ -924,13 +924,13 @@ static BOOL MDI_RestoreFrameMenu( HWND frame, HWND hChild ) ...@@ -924,13 +924,13 @@ static BOOL MDI_RestoreFrameMenu( HWND frame, HWND hChild )
TRACE("frame %p, child %p\n", frame, 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 */ /* if there is no system buttons then nothing to do */
nItems = GetMenuItemCount(menu) - 1; nItems = GetMenuItemCount(menu) - 1;
iId = GetMenuItemID(menu, nItems); iId = GetMenuItemID(menu, nItems);
if ( !(iId == SC_RESTORE || iId == SC_CLOSE) ) if ( !(iId == SC_RESTORE || iId == SC_CLOSE) )
return 0; return FALSE;
/* /*
* Remove the system menu, If that menu is the icon of the window * 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 ) ...@@ -963,7 +963,7 @@ static BOOL MDI_RestoreFrameMenu( HWND frame, HWND hChild )
DrawMenuBar(frame); DrawMenuBar(frame);
return 1; return TRUE;
} }
...@@ -1665,7 +1665,7 @@ BOOL WINAPI TranslateMDISysAccel( HWND hwndClient, LPMSG msg ) ...@@ -1665,7 +1665,7 @@ BOOL WINAPI TranslateMDISysAccel( HWND hwndClient, LPMSG msg )
MDICLIENTINFO *ci = get_client_info( hwndClient ); MDICLIENTINFO *ci = get_client_info( hwndClient );
WPARAM wParam = 0; 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. */ /* translate if the Ctrl key is down and Alt not. */
...@@ -1686,14 +1686,14 @@ BOOL WINAPI TranslateMDISysAccel( HWND hwndClient, LPMSG msg ) ...@@ -1686,14 +1686,14 @@ BOOL WINAPI TranslateMDISysAccel( HWND hwndClient, LPMSG msg )
} }
/* fall through */ /* fall through */
default: default:
return 0; return FALSE;
} }
TRACE("wParam = %04lx\n", wParam); TRACE("wParam = %04lx\n", wParam);
SendMessageW(ci->hwndActiveChild, WM_SYSCOMMAND, wParam, msg->wParam); SendMessageW(ci->hwndActiveChild, WM_SYSCOMMAND, wParam, msg->wParam);
return 1; return TRUE;
} }
} }
return 0; /* failure */ return FALSE; /* failure */
} }
/*********************************************************************** /***********************************************************************
......
...@@ -1172,7 +1172,7 @@ static void MENU_PopupMenuCalcSize( LPPOPUPMENU lppop ) ...@@ -1172,7 +1172,7 @@ static void MENU_PopupMenuCalcSize( LPPOPUPMENU lppop )
MENUITEM *lpitem; MENUITEM *lpitem;
HDC hdc; HDC hdc;
UINT start, i; UINT start, i;
int textandbmp = FALSE; BOOL textandbmp = FALSE;
int orgX, orgY, maxX, maxTab, maxTabWidth, maxHeight; int orgX, orgY, maxX, maxTab, maxTabWidth, maxHeight;
lppop->Width = lppop->Height = 0; lppop->Width = lppop->Height = 0;
...@@ -1591,7 +1591,7 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc, ...@@ -1591,7 +1591,7 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
HBITMAP bm; HBITMAP bm;
INT y = rect.top + rect.bottom; INT y = rect.top + rect.bottom;
RECT rc = rect; RECT rc = rect;
int checked = FALSE; BOOL checked = FALSE;
UINT check_bitmap_width = GetSystemMetrics( SM_CXMENUCHECK ); UINT check_bitmap_width = GetSystemMetrics( SM_CXMENUCHECK );
UINT check_bitmap_height = GetSystemMetrics( SM_CYMENUCHECK ); UINT check_bitmap_height = GetSystemMetrics( SM_CYMENUCHECK );
/* Draw the check mark /* Draw the check mark
......
...@@ -422,14 +422,14 @@ static const unsigned int message_unicode_flags[] = ...@@ -422,14 +422,14 @@ static const unsigned int message_unicode_flags[] =
}; };
/* check whether a given message type includes pointers */ /* 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; if (message >= 8*sizeof(message_pointer_flags)) return FALSE;
return (message_pointer_flags[message / 32] & SET(message)) != 0; return (message_pointer_flags[message / 32] & SET(message)) != 0;
} }
/* check whether a given message type contains Unicode (or ASCII) chars */ /* 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; if (message >= 8*sizeof(message_unicode_flags)) return FALSE;
return (message_unicode_flags[message / 32] & SET(message)) != 0; return (message_unicode_flags[message / 32] & SET(message)) != 0;
......
...@@ -458,7 +458,7 @@ void WINAPI RegisterSystemThread(DWORD flags, DWORD reserved) ...@@ -458,7 +458,7 @@ void WINAPI RegisterSystemThread(DWORD flags, DWORD reserved)
BOOL WINAPI RegisterShellHookWindow ( HWND hWnd ) BOOL WINAPI RegisterShellHookWindow ( HWND hWnd )
{ {
FIXME("(%p): stub\n", hWnd); FIXME("(%p): stub\n", hWnd);
return 0; return FALSE;
} }
......
...@@ -3478,7 +3478,7 @@ BOOL WINAPI SetWindowContextHelpId( HWND hwnd, DWORD id ) ...@@ -3478,7 +3478,7 @@ BOOL WINAPI SetWindowContextHelpId( HWND hwnd, DWORD id )
if (wnd == WND_OTHER_PROCESS) if (wnd == WND_OTHER_PROCESS)
{ {
if (IsWindow( hwnd )) FIXME( "not supported on other process window %p\n", hwnd ); if (IsWindow( hwnd )) FIXME( "not supported on other process window %p\n", hwnd );
return 0; return FALSE;
} }
wnd->helpContext = id; wnd->helpContext = id;
WIN_ReleasePtr( wnd ); WIN_ReleasePtr( wnd );
...@@ -3511,7 +3511,7 @@ BOOL WINAPI DragDetect( HWND hWnd, POINT pt ) ...@@ -3511,7 +3511,7 @@ BOOL WINAPI DragDetect( HWND hWnd, POINT pt )
if( msg.message == WM_LBUTTONUP ) if( msg.message == WM_LBUTTONUP )
{ {
ReleaseCapture(); ReleaseCapture();
return 0; return FALSE;
} }
if( msg.message == WM_MOUSEMOVE ) if( msg.message == WM_MOUSEMOVE )
{ {
...@@ -3521,13 +3521,13 @@ BOOL WINAPI DragDetect( HWND hWnd, POINT pt ) ...@@ -3521,13 +3521,13 @@ BOOL WINAPI DragDetect( HWND hWnd, POINT pt )
if( !PtInRect( &rect, tmp )) if( !PtInRect( &rect, tmp ))
{ {
ReleaseCapture(); ReleaseCapture();
return 1; return TRUE;
} }
} }
} }
WaitMessage(); WaitMessage();
} }
return 0; return FALSE;
} }
/****************************************************************************** /******************************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment