Author: rnaumann
Date: Sat Mar 4 18:12:42 2017
New Revision: 74057
URL:
http://svn.reactos.org/svn/reactos?rev=74057&view=rev
Log:
[DESK] Fix Font Smoothing Dropdown Field. Patch by Katayama Hirofumi MZ CORE-12568
Modified:
trunk/reactos/dll/cpl/desk/effappdlg.c
Modified: trunk/reactos/dll/cpl/desk/effappdlg.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/effappdlg.c?r…
==============================================================================
--- trunk/reactos/dll/cpl/desk/effappdlg.c [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/desk/effappdlg.c [iso-8859-1] Sat Mar 4 18:12:42 2017
@@ -58,16 +58,13 @@
static VOID
AddToCombobox(INT Combo, HWND hwndDlg, INT From, INT To)
{
- INT iElement, iListIndex, i = 0;
+ INT iElement;
TCHAR tstrText[80];
- if (Combo == IDC_EFFAPPEARANCE_SMOOTHINGTYPE) i = 1;
-
- for (iElement = From; iElement<=To; iElement++)
+ for (iElement = From; iElement <= To; iElement++)
{
LoadString(hApplet, iElement, (LPTSTR)tstrText, ARRAYSIZE(tstrText));
- iListIndex = SendDlgItemMessage(hwndDlg, Combo, CB_ADDSTRING, 0,
(LPARAM)tstrText);
- SendDlgItemMessageW(hwndDlg, Combo, CB_SETITEMDATA, (WPARAM)iListIndex,
(LPARAM)i++);
+ SendDlgItemMessage(hwndDlg, Combo, CB_ADDSTRING, 0, (LPARAM)tstrText);
}
}
@@ -159,10 +156,14 @@
case IDC_EFFAPPEARANCE_SMOOTHINGTYPE:
if (HIWORD(wParam) == CBN_SELCHANGE)
{
- INT fontTypeIndex = SendDlgItemMessageW(hwndDlg,
IDC_EFFAPPEARANCE_SMOOTHINGTYPE, CB_GETCURSEL, 0, 0);
+ INT Index =
+ SendDlgItemMessageW(hwndDlg,
IDC_EFFAPPEARANCE_SMOOTHINGTYPE,
+ CB_GETCURSEL, 0, 0);
- g->SchemeAdv.Effects.bMenuFade =
SendDlgItemMessageW(hwndDlg, IDC_EFFAPPEARANCE_ANIMATIONTYPE, CB_GETCURSEL,
0, 0);
- g->SchemeAdv.Effects.uiFontSmoothingType =
SendDlgItemMessageW(hwndDlg, IDC_EFFAPPEARANCE_SMOOTHINGTYPE, CB_GETITEMDATA,
fontTypeIndex, 0);
+ g->SchemeAdv.Effects.bMenuFade =
+ SendDlgItemMessageW(hwndDlg,
IDC_EFFAPPEARANCE_ANIMATIONTYPE,
+ CB_GETCURSEL, 0, 0);
+ g->SchemeAdv.Effects.uiFontSmoothingType = (Index == CB_ERR) ?
0 : (Index + 1);
UpdateControls(hwndDlg, g);
}