Author: janderwald Date: Sun May 9 15:12:21 2010 New Revision: 47144
URL: http://svn.reactos.org/svn/reactos?rev=47144&view=rev Log: [CONSOLE] - Store console changes when screen buffer / window size changes - Mark property sheet as changed when color control changes
Modified: trunk/reactos/dll/cpl/console/colors.c trunk/reactos/dll/cpl/console/layout.c
Modified: trunk/reactos/dll/cpl/console/colors.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/console/colors.c?re... ============================================================================== --- trunk/reactos/dll/cpl/console/colors.c [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/console/colors.c [iso-8859-1] Sun May 9 15:12:21 2010 @@ -231,6 +231,7 @@ InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_SCREEN_COLOR), NULL, TRUE); InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_POPUP_COLOR), NULL, TRUE); pConInfo->ActiveStaticControl = index; + PropSheet_Changed(GetParent(hwndDlg), hwndDlg); break; } }
Modified: trunk/reactos/dll/cpl/console/layout.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/console/layout.c?re... ============================================================================== --- trunk/reactos/dll/cpl/console/layout.c [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/console/layout.c [iso-8859-1] Sun May 9 15:12:21 2010 @@ -294,6 +294,52 @@ { switch(LOWORD(wParam)) { + case IDC_EDIT_SCREEN_BUFFER_WIDTH: + case IDC_EDIT_SCREEN_BUFFER_HEIGHT: + case IDC_EDIT_WINDOW_SIZE_WIDTH: + case IDC_UPDOWN_WINDOW_SIZE_HEIGHT: + case IDC_EDIT_WINDOW_POS_LEFT: + case IDC_EDIT_WINDOW_POS_TOP: + { + if (HIWORD(wParam) == EN_KILLFOCUS) + { + DWORD wheight, wwidth; + DWORD sheight, swidth; + DWORD left, top; + + wwidth = GetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_SIZE_WIDTH, NULL, FALSE); + wheight = GetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_SIZE_HEIGHT, NULL, FALSE); + swidth = GetDlgItemInt(hwndDlg, IDC_EDIT_SCREEN_BUFFER_WIDTH, NULL, FALSE); + sheight = GetDlgItemInt(hwndDlg, IDC_EDIT_SCREEN_BUFFER_HEIGHT, NULL, FALSE); + left = GetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_POS_LEFT, NULL, FALSE); + top = GetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_POS_TOP, NULL, FALSE); + + swidth = max(swidth, 1); + sheight = max(sheight, 1); + + /* automatically adjust window size when screen buffer decreases */ + if (wwidth > swidth) + { + SetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_SIZE_WIDTH, swidth, TRUE); + wwidth = swidth; + } + + if (wheight > sheight) + { + SetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_SIZE_HEIGHT, sheight, TRUE); + wheight = sheight; + } + + + pConInfo->ScreenBuffer = MAKELONG(swidth, sheight); + pConInfo->WindowSize = MAKELONG(wwidth, wheight); + pConInfo->WindowPosition = MAKELONG(left, top); + + PropSheet_Changed(GetParent(hwndDlg), hwndDlg); + } + break; + } + case IDC_CHECK_SYSTEM_POS_WINDOW: { LONG res = SendMessage((HWND)lParam, BM_GETCHECK, 0, 0);