diff --git a/dlls/comdlg32/colordlg.c b/dlls/comdlg32/colordlg.c index 4a342b74231..8b307aecb16 100644 --- a/dlls/comdlg32/colordlg.c +++ b/dlls/comdlg32/colordlg.c @@ -256,9 +256,9 @@ static void CC_DrawFocusRect(CCPRIV *lpp, HWND hwnd, int x, int y, int rows, int /*********************************************************************** * CC_MouseCheckPredefColorArray [internal] - * returns 1 if one of the predefined colors is clicked + * returns TRUE if one of the predefined colors is clicked */ -static int CC_MouseCheckPredefColorArray(CCPRIV *lpp, int rows, int cols, LPARAM lParam) +static BOOL CC_MouseCheckPredefColorArray(CCPRIV *lpp, int rows, int cols, LPARAM lParam) { HWND hwnd; POINT point; @@ -281,17 +281,17 @@ static int CC_MouseCheckPredefColorArray(CCPRIV *lpp, int rows, int cols, LPARAM y = point.y / dy; lpp->lpcc->rgbResult = predefcolors[y][x]; CC_DrawFocusRect(lpp, hwnd, x, y, rows, cols); - return 1; + return TRUE; } } - return 0; + return FALSE; } /*********************************************************************** * CC_MouseCheckUserColorArray [internal] - * return 1 if the user clicked a color + * return TRUE if the user clicked a color */ -static int CC_MouseCheckUserColorArray(CCPRIV *lpp, int rows, int cols, LPARAM lParam) +static BOOL CC_MouseCheckUserColorArray(CCPRIV *lpp, int rows, int cols, LPARAM lParam) { HWND hwnd; POINT point; @@ -315,10 +315,10 @@ static int CC_MouseCheckUserColorArray(CCPRIV *lpp, int rows, int cols, LPARAM l y = point.y / dy; lpp->lpcc->rgbResult = crarr[x + (cols * y) ]; CC_DrawFocusRect(lpp, hwnd, x, y, rows, cols); - return 1; + return TRUE; } } - return 0; + return FALSE; } #define MAXVERT 240 @@ -334,7 +334,7 @@ static int CC_MouseCheckUserColorArray(CCPRIV *lpp, int rows, int cols, LPARAM l /*********************************************************************** * CC_MouseCheckColorGraph [internal] */ -static int CC_MouseCheckColorGraph( HWND hDlg, int dlgitem, int *hori, int *vert, LPARAM lParam ) +static BOOL CC_MouseCheckColorGraph( HWND hDlg, int dlgitem, int *hori, int *vert, LPARAM lParam ) { HWND hwnd; POINT point; @@ -347,7 +347,7 @@ static int CC_MouseCheckColorGraph( HWND hDlg, int dlgitem, int *hori, int *vert GetWindowRect(hwnd, &rect); if (!PtInRect(&rect, point)) - return 0; + return FALSE; GetClientRect(hwnd, &rect); ScreenToClient(hwnd, &point); @@ -367,13 +367,13 @@ static int CC_MouseCheckColorGraph( HWND hDlg, int dlgitem, int *hori, int *vert if (vert) *vert = y; - return 1; + return TRUE; } /*********************************************************************** * CC_MouseCheckResultWindow [internal] * test if double click one of the result colors */ -static int CC_MouseCheckResultWindow( HWND hDlg, LPARAM lParam ) +static BOOL CC_MouseCheckResultWindow( HWND hDlg, LPARAM lParam ) { HWND hwnd; POINT point; @@ -386,9 +386,9 @@ static int CC_MouseCheckResultWindow( HWND hDlg, LPARAM lParam ) if (PtInRect(&rect, point)) { PostMessageA(hDlg, WM_COMMAND, IDC_COLOR_RES, 0); - return 1; + return TRUE; } - return 0; + return FALSE; } /*********************************************************************** diff --git a/dlls/comdlg32/filedlg.c b/dlls/comdlg32/filedlg.c index 850edad263a..9dbb69d76f6 100644 --- a/dlls/comdlg32/filedlg.c +++ b/dlls/comdlg32/filedlg.c @@ -461,7 +461,7 @@ static BOOL GetFileDialog95A(LPOPENFILENAMEA ofn,UINT iDlgType) ret = GetFileName95(&fodInfos); break; default : - ret = 0; + ret = FALSE; } if (lpstrSavDir) @@ -553,7 +553,7 @@ static BOOL GetFileDialog95W(LPOPENFILENAMEW ofn,UINT iDlgType) ret = GetFileName95(&fodInfos); break; default : - ret = 0; + ret = FALSE; } if (lpstrSavDir) diff --git a/dlls/comdlg32/filedlg31.c b/dlls/comdlg32/filedlg31.c index 7f918ff16f1..5f4c676b124 100644 --- a/dlls/comdlg32/filedlg31.c +++ b/dlls/comdlg32/filedlg31.c @@ -77,7 +77,7 @@ typedef struct tagFD31_DATA */ static BOOL FD31_Init(void) { - static BOOL initialized = 0; + static BOOL initialized = FALSE; if (!initialized) { hFolder = LoadImageA( COMDLG32_hInstance, "FOLDER", IMAGE_ICON, 16, 16, LR_SHARED ); diff --git a/dlls/comdlg32/fontdlg.c b/dlls/comdlg32/fontdlg.c index 909f43a909a..68f0467bd9f 100644 --- a/dlls/comdlg32/fontdlg.c +++ b/dlls/comdlg32/fontdlg.c @@ -361,7 +361,7 @@ static INT WINAPI FontFamilyEnumProc(const ENUMLOGFONTEXW *lpElfex, * * Fill font style information into combobox (without using font.c directly) */ -static int SetFontStylesToCombo2(HWND hwnd, HDC hdc, const LOGFONTW *lplf) +static BOOL SetFontStylesToCombo2(HWND hwnd, HDC hdc, const LOGFONTW *lplf) { #define FSTYLES 4 struct FONTSTYLE @@ -400,19 +400,19 @@ static int SetFontStylesToCombo2(HWND hwnd, HDC hdc, const LOGFONTW *lplf) WCHAR name[64]; LoadStringW(COMDLG32_hInstance, fontstyles[i].resId, name, 64); j=SendMessageW(hwnd,CB_ADDSTRING,0,(LPARAM)name ); - if (j==CB_ERR) return 1; + if (j==CB_ERR) return TRUE; j=SendMessageW(hwnd, CB_SETITEMDATA, j, MAKELONG(tm.tmWeight,fontstyles[i].italic)); - if (j==CB_ERR) return 1; + if (j==CB_ERR) return TRUE; } } - return 0; + return FALSE; } /************************************************************************* * AddFontSizeToCombo3 [internal] */ -static int AddFontSizeToCombo3(HWND hwnd, UINT h, const CHOOSEFONTW *lpcf) +static BOOL AddFontSizeToCombo3(HWND hwnd, UINT h, const CHOOSEFONTW *lpcf) { int j; WCHAR buffer[20]; @@ -427,23 +427,23 @@ static int AddFontSizeToCombo3(HWND hwnd, UINT h, const CHOOSEFONTW *lpcf) { j=SendMessageW(hwnd, CB_ADDSTRING, 0, (LPARAM)buffer); if (j!=CB_ERR) j = SendMessageW(hwnd, CB_SETITEMDATA, j, h); - if (j==CB_ERR) return 1; + if (j==CB_ERR) return TRUE; } } - return 0; + return FALSE; } /************************************************************************* * SetFontSizesToCombo3 [internal] */ -static int SetFontSizesToCombo3(HWND hwnd, const CHOOSEFONTW *lpcf) +static BOOL SetFontSizesToCombo3(HWND hwnd, const CHOOSEFONTW *lpcf) { static const BYTE sizes[]={6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72}; unsigned int i; for (i = 0; i < sizeof(sizes)/sizeof(sizes[0]); i++) - if (AddFontSizeToCombo3(hwnd, sizes[i], lpcf)) return 1; - return 0; + if (AddFontSizeToCombo3(hwnd, sizes[i], lpcf)) return TRUE; + return FALSE; } /************************************************************************* @@ -506,16 +506,17 @@ static INT AddFontStyle( const ENUMLOGFONTEXW *lpElfex, const NEWTEXTMETRICEXW * INT points; points = MulDiv( lpNTM->ntmTm.tmHeight - lpNTM->ntmTm.tmInternalLeading, 72, GetScreenDPI()); - i = AddFontSizeToCombo3(hcmb3, points, lpcf); - if(i) return 0; + if (AddFontSizeToCombo3(hcmb3, points, lpcf)) + return 0; } else if (SetFontSizesToCombo3(hcmb3, lpcf)) return 0; if (!SendMessageW(hcmb2, CB_GETCOUNT, 0, 0)) { + BOOL res; if(!(hdc = CFn_GetDC(lpcf))) return 0; - i=SetFontStylesToCombo2(hcmb2,hdc,lplf); + res = SetFontStylesToCombo2(hcmb2,hdc,lplf); CFn_ReleaseDC(lpcf, hdc); - if (i) + if (res) return 0; } if (!( hcmb5 = GetDlgItem(hDlg, cmb5))) return 1; @@ -530,10 +531,10 @@ static INT AddFontStyle( const ENUMLOGFONTEXW *lpElfex, const NEWTEXTMETRICEXW * return 1 ; } -static INT CFn_FitFontSize( HWND hDlg, int points) +static BOOL CFn_FitFontSize( HWND hDlg, int points) { int i,n; - int ret = 0; + BOOL ret = FALSE; /* look for fitting font size in combobox3 */ n=SendDlgItemMessageW(hDlg, cmb3, CB_GETCOUNT, 0, 0); for (i=0;i