https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0e5496d082198f37f8d8e3...
commit 0e5496d082198f37f8d8e37de9caf9609d8e78a1 Author: Hermès Bélusca-Maïto hermes.belusca-maito@reactos.org AuthorDate: Sat Jan 29 01:39:02 2022 +0100 Commit: Hermès Bélusca-Maïto hermes.belusca-maito@reactos.org CommitDate: Sun Jan 30 01:02:06 2022 +0100
[CONSOLE.CPL] Add missing/fix some SendMessageW result casts. --- dll/cpl/console/font.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/dll/cpl/console/font.c b/dll/cpl/console/font.c index e6a998842dd..0909417dfee 100644 --- a/dll/cpl/console/font.c +++ b/dll/cpl/console/font.c @@ -165,7 +165,7 @@ FontSizeList_SelectFontSize( * We got an index beyond the end of the list (as per Bisect* functionality), * so instead, select the last element of the list. */ - nSel = idx-1; + nSel = idx - 1; } SendMessageW(SizeList->RasterSizeList.hWndList, LB_SETCURSEL, (WPARAM)nSel, 0); } @@ -178,10 +178,10 @@ FontSizeList_SelectFontSize( StringCchPrintfW(szFontSize, ARRAYSIZE(szFontSize), L"%d", FontSize);
/* Find the font size in the list, or add it both in the ComboBox list, sorted by size value (string), and its edit box */ - nSel = SendMessageW(SizeList->hWndTTSizeList, CB_FINDSTRINGEXACT, 0, (LPARAM)szFontSize); + nSel = (INT)SendMessageW(SizeList->hWndTTSizeList, CB_FINDSTRINGEXACT, 0, (LPARAM)szFontSize); if (nSel == CB_ERR) { - nSel = (UINT)SendMessageW(SizeList->hWndTTSizeList, CB_ADDSTRING, -1, (LPARAM)szFontSize); + nSel = (INT)SendMessageW(SizeList->hWndTTSizeList, CB_ADDSTRING, -1, (LPARAM)szFontSize); // ComboBox_SetText(...) SetWindowTextW(SizeList->hWndTTSizeList, szFontSize); SizeList->bIsTTSizeDirty = TRUE; @@ -223,7 +223,7 @@ FontSizeList_GetSelectedFontSize( * See: https://support.microsoft.com/en-us/help/66365/how-to-process-a-cbn-selchang... * for more details. */ - nSel = SendMessageW(SizeList->hWndTTSizeList, CB_GETCURSEL, 0, 0); + nSel = (INT)SendMessageW(SizeList->hWndTTSizeList, CB_GETCURSEL, 0, 0); SendMessageW(SizeList->hWndTTSizeList, CB_GETLBTEXT, nSel, (LPARAM)szFontSize);
/* Validate the font size */ @@ -243,10 +243,10 @@ FontSizeList_GetSelectedFontSize( return 0;
/* Find if the font size already exists in the list; if not, add it */ - nSel = SendMessageW(SizeList->hWndTTSizeList, CB_FINDSTRINGEXACT, 0, (LPARAM)szFontSize); + nSel = (INT)SendMessageW(SizeList->hWndTTSizeList, CB_FINDSTRINGEXACT, 0, (LPARAM)szFontSize); if (nSel == CB_ERR) { - nSel = (UINT)SendMessageW(SizeList->hWndTTSizeList, CB_ADDSTRING, -1, (LPARAM)szFontSize); + nSel = (INT)SendMessageW(SizeList->hWndTTSizeList, CB_ADDSTRING, -1, (LPARAM)szFontSize); //// ComboBox_SetText(...) //SetWindowTextW(SizeList->hWndTTSizeList, szFontSize); //SizeList->bIsTTSizeDirty = TRUE;