diff --git a/dlls/comdlg32/colordlg.c b/dlls/comdlg32/colordlg.c index 6bf54c3..5e67499 100644 --- a/dlls/comdlg32/colordlg.c +++ b/dlls/comdlg32/colordlg.c @@ -673,15 +673,11 @@ static void CC_EditSetRGB( CCPRIV *infoPtr ) int r = GetRValue(cr); int g = GetGValue(cr); int b = GetBValue(cr); - char buffer[10]; infoPtr->updating = TRUE; - sprintf(buffer, "%d", r); - SetWindowTextA( GetDlgItem(infoPtr->hwndSelf, IDC_COLOR_EDIT_R), buffer); - sprintf(buffer, "%d", g); - SetWindowTextA( GetDlgItem(infoPtr->hwndSelf, IDC_COLOR_EDIT_G), buffer); - sprintf( buffer, "%d", b ); - SetWindowTextA( GetDlgItem(infoPtr->hwndSelf, IDC_COLOR_EDIT_B), buffer); + SetDlgItemInt(infoPtr->hwndSelf, IDC_COLOR_EDIT_R, r, TRUE); + SetDlgItemInt(infoPtr->hwndSelf, IDC_COLOR_EDIT_G, g, TRUE); + SetDlgItemInt(infoPtr->hwndSelf, IDC_COLOR_EDIT_B, b, TRUE); infoPtr->updating = FALSE; } } @@ -693,15 +689,10 @@ static void CC_EditSetHSL( CCPRIV *infoPtr ) { if (IsWindowVisible( GetDlgItem(infoPtr->hwndSelf, IDC_COLOR_GRAPH) )) /* if full size */ { - char buffer[10]; - infoPtr->updating = TRUE; - sprintf(buffer, "%d", infoPtr->h); - SetWindowTextA( GetDlgItem(infoPtr->hwndSelf, IDC_COLOR_EDIT_H), buffer); - sprintf(buffer, "%d", infoPtr->s); - SetWindowTextA( GetDlgItem(infoPtr->hwndSelf, IDC_COLOR_EDIT_S), buffer); - sprintf(buffer, "%d", infoPtr->l); - SetWindowTextA( GetDlgItem(infoPtr->hwndSelf, IDC_COLOR_EDIT_L), buffer); + SetDlgItemInt(infoPtr->hwndSelf, IDC_COLOR_EDIT_H, infoPtr->h, TRUE); + SetDlgItemInt(infoPtr->hwndSelf, IDC_COLOR_EDIT_S, infoPtr->s, TRUE); + SetDlgItemInt(infoPtr->hwndSelf, IDC_COLOR_EDIT_L, infoPtr->l, TRUE); infoPtr->updating = FALSE; } CC_PaintLumBar(infoPtr); diff --git a/dlls/comdlg32/fontdlg.c b/dlls/comdlg32/fontdlg.c index ed2615d..c08b246 100644 --- a/dlls/comdlg32/fontdlg.c +++ b/dlls/comdlg32/fontdlg.c @@ -534,7 +534,6 @@ static INT AddFontStyle( const ENUMLOGFONTEXW *lpElfex, const NEWTEXTMETRICEXW * static void CFn_FitFontSize( HWND hDlg, int points) { - WCHAR buffW[16]; int i,n; /* look for fitting font size in combobox3 */ @@ -553,8 +552,7 @@ static void CFn_FitFontSize( HWND hDlg, int points) } /* no default matching size, set text manually */ - sprintfW(buffW, fontsizefmtW, points); - SetDlgItemTextW(hDlg, cmb3, buffW); + SetDlgItemInt(hDlg, cmb3, points, TRUE); } static BOOL CFn_FitFontStyle( HWND hDlg, LONG packedstyle )