[CONSOLE.DLL]
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sun, 3 Mar 2013 15:47:52 +0000 (15:47 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sun, 3 Mar 2013 15:47:52 +0000 (15:47 +0000)
Code formatting only (tab --> space indentation)

svn path=/branches/ros-csrss/; revision=58416

dll/cpl/console/colors.c
dll/cpl/console/layout.c
dll/cpl/console/options.c
dll/cpl/console/resource.h

index ca964d6..c133b4d 100644 (file)
@@ -40,49 +40,49 @@ ColorsProc(HWND hwndDlg,
            WPARAM wParam,
            LPARAM lParam)
 {
-       PCONSOLE_PROPS pConInfo;
-       LPDRAWITEMSTRUCT drawItem;
+    PCONSOLE_PROPS pConInfo;
+    LPDRAWITEMSTRUCT drawItem;
     DWORD colorIndex;
     COLORREF color;
 
-       pConInfo = (PCONSOLE_PROPS)GetWindowLongPtr(hwndDlg, DWLP_USER);
+    pConInfo = (PCONSOLE_PROPS)GetWindowLongPtr(hwndDlg, DWLP_USER);
 
-       switch (uMsg)
-       {
-               case WM_INITDIALOG:
-               {
-                       pConInfo = (PCONSOLE_PROPS)((LPPROPSHEETPAGE)lParam)->lParam;
-                       SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pConInfo);
+    switch (uMsg)
+    {
+        case WM_INITDIALOG:
+        {
+            pConInfo = (PCONSOLE_PROPS)((LPPROPSHEETPAGE)lParam)->lParam;
+            SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pConInfo);
 
             /* Set the valid range of the colour indicators */
-                       SendMessage(GetDlgItem(hwndDlg, IDC_UPDOWN_COLOR_RED), UDM_SETRANGE, 0, (LPARAM)MAKELONG(255, 0));
-                       SendMessage(GetDlgItem(hwndDlg, IDC_UPDOWN_COLOR_GREEN), UDM_SETRANGE, 0, (LPARAM)MAKELONG(255, 0));
-                       SendMessage(GetDlgItem(hwndDlg, IDC_UPDOWN_COLOR_BLUE), UDM_SETRANGE, 0, (LPARAM)MAKELONG(255, 0));
+            SendMessage(GetDlgItem(hwndDlg, IDC_UPDOWN_COLOR_RED), UDM_SETRANGE, 0, (LPARAM)MAKELONG(255, 0));
+            SendMessage(GetDlgItem(hwndDlg, IDC_UPDOWN_COLOR_GREEN), UDM_SETRANGE, 0, (LPARAM)MAKELONG(255, 0));
+            SendMessage(GetDlgItem(hwndDlg, IDC_UPDOWN_COLOR_BLUE), UDM_SETRANGE, 0, (LPARAM)MAKELONG(255, 0));
 
             /* Select by default the screen background option */
-                       CheckRadioButton(hwndDlg, IDC_RADIO_SCREEN_TEXT, IDC_RADIO_POPUP_BACKGROUND, IDC_RADIO_SCREEN_BACKGROUND);
+            CheckRadioButton(hwndDlg, IDC_RADIO_SCREEN_TEXT, IDC_RADIO_POPUP_BACKGROUND, IDC_RADIO_SCREEN_BACKGROUND);
             SendMessage(hwndDlg, WM_COMMAND, IDC_RADIO_SCREEN_BACKGROUND, 0);
 
-                       return TRUE;
-               }
-
-               case WM_DRAWITEM:
-               {
-                       drawItem = (LPDRAWITEMSTRUCT)lParam;
-                       if (drawItem->CtlID >= IDC_STATIC_COLOR1 && drawItem->CtlID <= IDC_STATIC_COLOR16)
-                       {
-                               return PaintStaticControls(hwndDlg, pConInfo, drawItem);
-                       }
-                       else if (drawItem->CtlID == IDC_STATIC_SCREEN_COLOR || drawItem->CtlID == IDC_STATIC_POPUP_COLOR)
-                       {
-                               PaintText(drawItem, pConInfo);
-                               return TRUE;
-                       }
+            return TRUE;
+        }
+
+        case WM_DRAWITEM:
+        {
+            drawItem = (LPDRAWITEMSTRUCT)lParam;
+            if (drawItem->CtlID >= IDC_STATIC_COLOR1 && drawItem->CtlID <= IDC_STATIC_COLOR16)
+            {
+                return PaintStaticControls(hwndDlg, pConInfo, drawItem);
+            }
+            else if (drawItem->CtlID == IDC_STATIC_SCREEN_COLOR || drawItem->CtlID == IDC_STATIC_POPUP_COLOR)
+            {
+                PaintText(drawItem, pConInfo);
+                return TRUE;
+            }
             break;
-               }
+        }
 
-               case WM_NOTIFY:
-               {
+        case WM_NOTIFY:
+        {
             switch (((LPNMHDR)lParam)->code)
             {
                 case PSN_APPLY:
@@ -145,15 +145,15 @@ ColorsProc(HWND hwndDlg,
                 }
             }
 
-                       break;
-               }
+            break;
+        }
 
-               case WM_COMMAND:
-               {
-                       switch (LOWORD(wParam))
-                       {
-                               case IDC_RADIO_SCREEN_TEXT:
-                               {
+        case WM_COMMAND:
+        {
+            switch (LOWORD(wParam))
+            {
+                case IDC_RADIO_SCREEN_TEXT:
+                {
                     /* Get the color of the screen foreground */
                     colorIndex = TextAttribFromAttrib(pConInfo->ci.ScreenAttrib);
                     color = pConInfo->ci.Colors[colorIndex];
@@ -166,13 +166,13 @@ ColorsProc(HWND hwndDlg,
                     InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_COLOR1 + pConInfo->ActiveStaticControl), NULL, TRUE);
                     pConInfo->ActiveStaticControl = colorIndex;
                     InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_COLOR1 + pConInfo->ActiveStaticControl), NULL, TRUE);
-                                       InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_SCREEN_COLOR), NULL, TRUE);
-                                       InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_POPUP_COLOR), NULL, TRUE);
-                                       break;
-                               }
+                    InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_SCREEN_COLOR), NULL, TRUE);
+                    InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_POPUP_COLOR), NULL, TRUE);
+                    break;
+                }
 
-                               case IDC_RADIO_SCREEN_BACKGROUND:
-                               {
+                case IDC_RADIO_SCREEN_BACKGROUND:
+                {
                     /* Get the color of the screen background */
                     colorIndex = BkgdAttribFromAttrib(pConInfo->ci.ScreenAttrib);
                     color = pConInfo->ci.Colors[colorIndex];
@@ -185,13 +185,13 @@ ColorsProc(HWND hwndDlg,
                     InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_COLOR1 + pConInfo->ActiveStaticControl), NULL, TRUE);
                     pConInfo->ActiveStaticControl = colorIndex;
                     InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_COLOR1 + pConInfo->ActiveStaticControl), NULL, TRUE);
-                                       InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_SCREEN_COLOR), NULL, TRUE);
-                                       InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_POPUP_COLOR), NULL, TRUE);
-                                       break;
-                               }
+                    InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_SCREEN_COLOR), NULL, TRUE);
+                    InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_POPUP_COLOR), NULL, TRUE);
+                    break;
+                }
 
-                               case IDC_RADIO_POPUP_TEXT:
-                               {
+                case IDC_RADIO_POPUP_TEXT:
+                {
                     /* Get the color of the popup foreground */
                     colorIndex = TextAttribFromAttrib(pConInfo->ci.PopupAttrib);
                     color = pConInfo->ci.Colors[colorIndex];
@@ -204,13 +204,13 @@ ColorsProc(HWND hwndDlg,
                     InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_COLOR1 + pConInfo->ActiveStaticControl), NULL, TRUE);
                     pConInfo->ActiveStaticControl = colorIndex;
                     InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_COLOR1 + pConInfo->ActiveStaticControl), NULL, TRUE);
-                                       InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_SCREEN_COLOR), NULL, TRUE);
-                                       InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_POPUP_COLOR), NULL, TRUE);
-                                       break;
-                               }
+                    InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_SCREEN_COLOR), NULL, TRUE);
+                    InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_POPUP_COLOR), NULL, TRUE);
+                    break;
+                }
 
-                               case IDC_RADIO_POPUP_BACKGROUND:
-                               {
+                case IDC_RADIO_POPUP_BACKGROUND:
+                {
                     /* Get the color of the popup background */
                     colorIndex = BkgdAttribFromAttrib(pConInfo->ci.PopupAttrib);
                     color = pConInfo->ci.Colors[colorIndex];
@@ -223,61 +223,61 @@ ColorsProc(HWND hwndDlg,
                     InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_COLOR1 + pConInfo->ActiveStaticControl), NULL, TRUE);
                     pConInfo->ActiveStaticControl = colorIndex;
                     InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_COLOR1 + pConInfo->ActiveStaticControl), NULL, TRUE);
-                                       InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_SCREEN_COLOR), NULL, TRUE);
-                                       InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_POPUP_COLOR), NULL, TRUE);
-                                       break;
-                               }
-                       }
+                    InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_SCREEN_COLOR), NULL, TRUE);
+                    InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_POPUP_COLOR), NULL, TRUE);
+                    break;
+                }
+            }
 
-                       if ( HIWORD(wParam) == STN_CLICKED &&
+            if ( HIWORD(wParam) == STN_CLICKED &&
                  IDC_STATIC_COLOR1 <= LOWORD(wParam) && LOWORD(wParam) <= IDC_STATIC_COLOR16 )
-                       {
-                               colorIndex = LOWORD(wParam) - IDC_STATIC_COLOR1;
+            {
+                colorIndex = LOWORD(wParam) - IDC_STATIC_COLOR1;
 
-                               if (colorIndex == pConInfo->ActiveStaticControl)
-                               {
-                                       /* Same static control was re-clicked */
-                                       break;
-                               }
+                if (colorIndex == pConInfo->ActiveStaticControl)
+                {
+                    /* Same static control was re-clicked */
+                    break;
+                }
 
                 color = pConInfo->ci.Colors[colorIndex];
 
-                               SetDlgItemInt(hwndDlg, IDC_EDIT_COLOR_RED, GetRValue(color), FALSE);
-                               SetDlgItemInt(hwndDlg, IDC_EDIT_COLOR_GREEN, GetGValue(color), FALSE);
-                               SetDlgItemInt(hwndDlg, IDC_EDIT_COLOR_BLUE, GetBValue(color), FALSE);
+                SetDlgItemInt(hwndDlg, IDC_EDIT_COLOR_RED, GetRValue(color), FALSE);
+                SetDlgItemInt(hwndDlg, IDC_EDIT_COLOR_GREEN, GetGValue(color), FALSE);
+                SetDlgItemInt(hwndDlg, IDC_EDIT_COLOR_BLUE, GetBValue(color), FALSE);
 
-                               /* Update global struct */
-                               if (IsDlgButtonChecked(hwndDlg, IDC_RADIO_SCREEN_TEXT))
-                               {
+                /* Update global struct */
+                if (IsDlgButtonChecked(hwndDlg, IDC_RADIO_SCREEN_TEXT))
+                {
                     pConInfo->ci.ScreenAttrib = MakeAttrib(colorIndex, BkgdAttribFromAttrib(pConInfo->ci.ScreenAttrib));
-                               }
-                               else if (IsDlgButtonChecked(hwndDlg, IDC_RADIO_SCREEN_BACKGROUND))
-                               {
+                }
+                else if (IsDlgButtonChecked(hwndDlg, IDC_RADIO_SCREEN_BACKGROUND))
+                {
                     pConInfo->ci.ScreenAttrib = MakeAttrib(TextAttribFromAttrib(pConInfo->ci.ScreenAttrib), colorIndex);
-                               }
-                               else if (IsDlgButtonChecked(hwndDlg, IDC_RADIO_POPUP_TEXT))
-                               {
+                }
+                else if (IsDlgButtonChecked(hwndDlg, IDC_RADIO_POPUP_TEXT))
+                {
                     pConInfo->ci.PopupAttrib = MakeAttrib(colorIndex, BkgdAttribFromAttrib(pConInfo->ci.PopupAttrib));
-                               }
-                               else if (IsDlgButtonChecked(hwndDlg, IDC_RADIO_POPUP_BACKGROUND))
-                               {
+                }
+                else if (IsDlgButtonChecked(hwndDlg, IDC_RADIO_POPUP_BACKGROUND))
+                {
                     pConInfo->ci.PopupAttrib = MakeAttrib(TextAttribFromAttrib(pConInfo->ci.PopupAttrib), colorIndex);
-                               }
+                }
 
-                               InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_COLOR1 + pConInfo->ActiveStaticControl), NULL, TRUE);
+                InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_COLOR1 + pConInfo->ActiveStaticControl), NULL, TRUE);
                 pConInfo->ActiveStaticControl = colorIndex;
-                               InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_COLOR1 + pConInfo->ActiveStaticControl), NULL, TRUE);
-                               InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_SCREEN_COLOR), NULL, TRUE);
-                               InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_POPUP_COLOR), NULL, TRUE);
+                InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_COLOR1 + pConInfo->ActiveStaticControl), NULL, TRUE);
+                InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_SCREEN_COLOR), NULL, TRUE);
+                InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_POPUP_COLOR), NULL, TRUE);
 
-                               PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
-                               break;
-                       }
-               }
+                PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
+                break;
+            }
+        }
 
-               default:
-                       break;
-       }
+        default:
+            break;
+    }
 
-       return FALSE;
+    return FALSE;
 }
index 72e4a5b..41ebd6d 100644 (file)
@@ -39,107 +39,106 @@ VOID
 PaintConsole(LPDRAWITEMSTRUCT drawItem,
              PCONSOLE_PROPS pConInfo)
 {
-       HBRUSH hBrush;
-       RECT cRect, fRect;
-       DWORD startx, starty;
-       DWORD endx, endy;
-       DWORD sizex, sizey;
+    HBRUSH hBrush;
+    RECT cRect, fRect;
+    DWORD startx, starty;
+    DWORD endx, endy;
+    DWORD sizex, sizey;
 
-       FillRect(drawItem->hDC, &drawItem->rcItem, GetSysColorBrush(COLOR_BACKGROUND));
+    FillRect(drawItem->hDC, &drawItem->rcItem, GetSysColorBrush(COLOR_BACKGROUND));
 
-       sizex = drawItem->rcItem.right - drawItem->rcItem.left;
-       sizey = drawItem->rcItem.bottom - drawItem->rcItem.top;
+    sizex = drawItem->rcItem.right - drawItem->rcItem.left;
+    sizey = drawItem->rcItem.bottom - drawItem->rcItem.top;
 
-       if ( pConInfo->ci.u.GuiInfo.WindowOrigin.x == MAXDWORD &&
+    if ( pConInfo->ci.u.GuiInfo.WindowOrigin.x == MAXDWORD &&
          pConInfo->ci.u.GuiInfo.WindowOrigin.y == MAXDWORD )
-       {
-               startx = sizex / 3;
-               starty = sizey / 3;
-       }
-       else
-       {
-               // TODO:
-               // Calculate pos correctly when console centered
-               startx = sizex / 3;
-               starty = sizey / 3;
-       }
-
-       // TODO:
-       // Strech console when bold fonts are selected
-       endx = drawItem->rcItem.right - startx + 15;
-       endy = starty + sizey / 3;
-
-       /* Draw console size */
-       SetRect(&cRect, startx, starty, endx, endy);
-       FillRect(drawItem->hDC, &cRect, GetSysColorBrush(COLOR_WINDOWFRAME));
-
-       /* Draw console border */
-       SetRect(&fRect, startx + 1, starty + 1, cRect.right - 1, cRect.bottom - 1);
-       FrameRect(drawItem->hDC, &fRect, GetSysColorBrush(COLOR_ACTIVEBORDER));
-
-       /* Draw left box */
-       SetRect(&fRect, startx + 3, starty + 3, startx + 5, starty + 5);
-       FillRect(drawItem->hDC, &fRect, GetSysColorBrush(COLOR_ACTIVEBORDER));
-
-       /* Draw window title */
-       SetRect(&fRect, startx + 7, starty + 3, cRect.right - 9, starty + 5);
-       FillRect(drawItem->hDC, &fRect, GetSysColorBrush(COLOR_ACTIVECAPTION));
-
-       /* Draw first right box */
-       SetRect(&fRect, fRect.right + 1, starty + 3, fRect.right + 3, starty + 5);
-       FillRect(drawItem->hDC, &fRect, GetSysColorBrush(COLOR_ACTIVEBORDER));
-
-       /* Draw second right box */
-       SetRect(&fRect, fRect.right + 1, starty + 3, fRect.right + 3, starty + 5);
-       FillRect(drawItem->hDC, &fRect, GetSysColorBrush(COLOR_ACTIVEBORDER));
-
-       /* Draw scrollbar */
-       SetRect(&fRect, cRect.right - 5, fRect.bottom + 1, cRect.right - 3, cRect.bottom - 3);
-       FillRect(drawItem->hDC, &fRect, GetSysColorBrush(COLOR_SCROLLBAR));
-
-       /* Draw console background */
-       hBrush = CreateSolidBrush(pConInfo->ci.Colors[BkgdAttribFromAttrib(pConInfo->ci.ScreenAttrib)]);
-       SetRect(&fRect, startx + 3, starty + 6, cRect.right - 6, cRect.bottom - 3);
-       FillRect(drawItem->hDC, &fRect, hBrush);
-       DeleteObject((HGDIOBJ)hBrush);
+    {
+        startx = sizex / 3;
+        starty = sizey / 3;
+    }
+    else
+    {
+        // TODO:
+        // Calculate pos correctly when console centered
+        startx = sizex / 3;
+        starty = sizey / 3;
+    }
+
+    // TODO:
+    // Strech console when bold fonts are selected
+    endx = drawItem->rcItem.right - startx + 15;
+    endy = starty + sizey / 3;
+
+    /* Draw console size */
+    SetRect(&cRect, startx, starty, endx, endy);
+    FillRect(drawItem->hDC, &cRect, GetSysColorBrush(COLOR_WINDOWFRAME));
+
+    /* Draw console border */
+    SetRect(&fRect, startx + 1, starty + 1, cRect.right - 1, cRect.bottom - 1);
+    FrameRect(drawItem->hDC, &fRect, GetSysColorBrush(COLOR_ACTIVEBORDER));
+
+    /* Draw left box */
+    SetRect(&fRect, startx + 3, starty + 3, startx + 5, starty + 5);
+    FillRect(drawItem->hDC, &fRect, GetSysColorBrush(COLOR_ACTIVEBORDER));
+
+    /* Draw window title */
+    SetRect(&fRect, startx + 7, starty + 3, cRect.right - 9, starty + 5);
+    FillRect(drawItem->hDC, &fRect, GetSysColorBrush(COLOR_ACTIVECAPTION));
+
+    /* Draw first right box */
+    SetRect(&fRect, fRect.right + 1, starty + 3, fRect.right + 3, starty + 5);
+    FillRect(drawItem->hDC, &fRect, GetSysColorBrush(COLOR_ACTIVEBORDER));
+
+    /* Draw second right box */
+    SetRect(&fRect, fRect.right + 1, starty + 3, fRect.right + 3, starty + 5);
+    FillRect(drawItem->hDC, &fRect, GetSysColorBrush(COLOR_ACTIVEBORDER));
+
+    /* Draw scrollbar */
+    SetRect(&fRect, cRect.right - 5, fRect.bottom + 1, cRect.right - 3, cRect.bottom - 3);
+    FillRect(drawItem->hDC, &fRect, GetSysColorBrush(COLOR_SCROLLBAR));
+
+    /* Draw console background */
+    hBrush = CreateSolidBrush(pConInfo->ci.Colors[BkgdAttribFromAttrib(pConInfo->ci.ScreenAttrib)]);
+    SetRect(&fRect, startx + 3, starty + 6, cRect.right - 6, cRect.bottom - 3);
+    FillRect(drawItem->hDC, &fRect, hBrush);
+    DeleteObject((HGDIOBJ)hBrush);
 }
 
 VOID PaintText(LPDRAWITEMSTRUCT drawItem,
                PCONSOLE_PROPS pConInfo)
 {
-       COLORREF pbkColor, ptColor;
-       COLORREF nbkColor, ntColor;
-       HBRUSH hBrush = NULL;
-
-       if (drawItem->CtlID == IDC_STATIC_SCREEN_COLOR)
-       {
-               nbkColor = pConInfo->ci.Colors[BkgdAttribFromAttrib(pConInfo->ci.ScreenAttrib)];
-               hBrush = CreateSolidBrush(nbkColor);
-               ntColor = pConInfo->ci.Colors[TextAttribFromAttrib(pConInfo->ci.ScreenAttrib)];
-       }
-       else if (drawItem->CtlID == IDC_STATIC_POPUP_COLOR)
-       {
-               nbkColor = pConInfo->ci.Colors[BkgdAttribFromAttrib(pConInfo->ci.PopupAttrib)];
-               hBrush = CreateSolidBrush(nbkColor);
-               ntColor = pConInfo->ci.Colors[TextAttribFromAttrib(pConInfo->ci.PopupAttrib)];
-       }
-
-       if (!hBrush)
-       {
-               return;
-       }
-
-       FillRect(drawItem->hDC, &drawItem->rcItem, hBrush);
-
-       ptColor = SetTextColor(drawItem->hDC, ntColor);
-       pbkColor = SetBkColor(drawItem->hDC, nbkColor);
-       DrawText(drawItem->hDC, szPreviewText, _tcslen(szPreviewText), &drawItem->rcItem, 0);
-       SetTextColor(drawItem->hDC, ptColor);
-       SetBkColor(drawItem->hDC, pbkColor);
-       DeleteObject((HGDIOBJ)hBrush);
+    COLORREF pbkColor, ptColor;
+    COLORREF nbkColor, ntColor;
+    HBRUSH hBrush = NULL;
+
+    if (drawItem->CtlID == IDC_STATIC_SCREEN_COLOR)
+    {
+        nbkColor = pConInfo->ci.Colors[BkgdAttribFromAttrib(pConInfo->ci.ScreenAttrib)];
+        hBrush = CreateSolidBrush(nbkColor);
+        ntColor = pConInfo->ci.Colors[TextAttribFromAttrib(pConInfo->ci.ScreenAttrib)];
+    }
+    else if (drawItem->CtlID == IDC_STATIC_POPUP_COLOR)
+    {
+        nbkColor = pConInfo->ci.Colors[BkgdAttribFromAttrib(pConInfo->ci.PopupAttrib)];
+        hBrush = CreateSolidBrush(nbkColor);
+        ntColor = pConInfo->ci.Colors[TextAttribFromAttrib(pConInfo->ci.PopupAttrib)];
+    }
+
+    if (!hBrush)
+    {
+        return;
+    }
+
+    FillRect(drawItem->hDC, &drawItem->rcItem, hBrush);
+
+    ptColor = SetTextColor(drawItem->hDC, ntColor);
+    pbkColor = SetBkColor(drawItem->hDC, nbkColor);
+    DrawText(drawItem->hDC, szPreviewText, _tcslen(szPreviewText), &drawItem->rcItem, 0);
+    SetTextColor(drawItem->hDC, ptColor);
+    SetBkColor(drawItem->hDC, pbkColor);
+    DeleteObject((HGDIOBJ)hBrush);
 }
 
-
 INT_PTR
 CALLBACK
 LayoutProc(HWND hwndDlg,
@@ -147,248 +146,248 @@ LayoutProc(HWND hwndDlg,
            WPARAM wParam,
            LPARAM lParam)
 {
-       LPNMUPDOWN lpnmud;
-       LPPSHNOTIFY lppsn;
-       PCONSOLE_PROPS pConInfo = (PCONSOLE_PROPS)GetWindowLongPtr(hwndDlg, DWLP_USER);
-
-       UNREFERENCED_PARAMETER(hwndDlg);
-       UNREFERENCED_PARAMETER(wParam);
-
-       switch (uMsg)
-       {
-               case WM_INITDIALOG:
-               {
-                       DWORD xres, yres;
-                       HDC hDC;
-                       pConInfo = (PCONSOLE_PROPS)((LPPROPSHEETPAGE)lParam)->lParam;
-                       SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pConInfo);
-
-                       SendMessage(GetDlgItem(hwndDlg, IDC_UPDOWN_SCREEN_BUFFER_HEIGHT), UDM_SETRANGE, 0, (LPARAM)MAKELONG(9999, 1));
-                       SendMessage(GetDlgItem(hwndDlg, IDC_UPDOWN_SCREEN_BUFFER_WIDTH), UDM_SETRANGE, 0, (LPARAM)MAKELONG(9999, 1));
-                       SendMessage(GetDlgItem(hwndDlg, IDC_UPDOWN_WINDOW_SIZE_HEIGHT), UDM_SETRANGE, 0, (LPARAM)MAKELONG(9999, 1));
-                       SendMessage(GetDlgItem(hwndDlg, IDC_UPDOWN_WINDOW_SIZE_WIDTH), UDM_SETRANGE, 0, (LPARAM)MAKELONG(9999, 1));
-
-                       SetDlgItemInt(hwndDlg, IDC_EDIT_SCREEN_BUFFER_HEIGHT, pConInfo->ci.ScreenBufferSize.Y, FALSE);
-                       SetDlgItemInt(hwndDlg, IDC_EDIT_SCREEN_BUFFER_WIDTH, pConInfo->ci.ScreenBufferSize.X, FALSE);
-                       SetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_SIZE_HEIGHT, pConInfo->ci.ConsoleSize.Y, FALSE);
-                       SetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_SIZE_WIDTH, pConInfo->ci.ConsoleSize.X, FALSE);
-
-                       hDC = GetDC(NULL);
-                       xres = GetDeviceCaps(hDC, HORZRES);
-                       yres = GetDeviceCaps(hDC, VERTRES);
-                       SendMessage(GetDlgItem(hwndDlg, IDC_UPDOWN_WINDOW_POS_LEFT), UDM_SETRANGE, 0, (LPARAM)MAKELONG(xres, 0));
-                       SendMessage(GetDlgItem(hwndDlg, IDC_UPDOWN_WINDOW_POS_TOP), UDM_SETRANGE, 0, (LPARAM)MAKELONG(yres, 0));
-
-                       if ( pConInfo->ci.u.GuiInfo.WindowOrigin.x != MAXDWORD &&
+    LPNMUPDOWN lpnmud;
+    LPPSHNOTIFY lppsn;
+    PCONSOLE_PROPS pConInfo = (PCONSOLE_PROPS)GetWindowLongPtr(hwndDlg, DWLP_USER);
+
+    UNREFERENCED_PARAMETER(hwndDlg);
+    UNREFERENCED_PARAMETER(wParam);
+
+    switch (uMsg)
+    {
+        case WM_INITDIALOG:
+        {
+            DWORD xres, yres;
+            HDC hDC;
+            pConInfo = (PCONSOLE_PROPS)((LPPROPSHEETPAGE)lParam)->lParam;
+            SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pConInfo);
+
+            SendMessage(GetDlgItem(hwndDlg, IDC_UPDOWN_SCREEN_BUFFER_HEIGHT), UDM_SETRANGE, 0, (LPARAM)MAKELONG(9999, 1));
+            SendMessage(GetDlgItem(hwndDlg, IDC_UPDOWN_SCREEN_BUFFER_WIDTH), UDM_SETRANGE, 0, (LPARAM)MAKELONG(9999, 1));
+            SendMessage(GetDlgItem(hwndDlg, IDC_UPDOWN_WINDOW_SIZE_HEIGHT), UDM_SETRANGE, 0, (LPARAM)MAKELONG(9999, 1));
+            SendMessage(GetDlgItem(hwndDlg, IDC_UPDOWN_WINDOW_SIZE_WIDTH), UDM_SETRANGE, 0, (LPARAM)MAKELONG(9999, 1));
+
+            SetDlgItemInt(hwndDlg, IDC_EDIT_SCREEN_BUFFER_HEIGHT, pConInfo->ci.ScreenBufferSize.Y, FALSE);
+            SetDlgItemInt(hwndDlg, IDC_EDIT_SCREEN_BUFFER_WIDTH, pConInfo->ci.ScreenBufferSize.X, FALSE);
+            SetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_SIZE_HEIGHT, pConInfo->ci.ConsoleSize.Y, FALSE);
+            SetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_SIZE_WIDTH, pConInfo->ci.ConsoleSize.X, FALSE);
+
+            hDC = GetDC(NULL);
+            xres = GetDeviceCaps(hDC, HORZRES);
+            yres = GetDeviceCaps(hDC, VERTRES);
+            SendMessage(GetDlgItem(hwndDlg, IDC_UPDOWN_WINDOW_POS_LEFT), UDM_SETRANGE, 0, (LPARAM)MAKELONG(xres, 0));
+            SendMessage(GetDlgItem(hwndDlg, IDC_UPDOWN_WINDOW_POS_TOP), UDM_SETRANGE, 0, (LPARAM)MAKELONG(yres, 0));
+
+            if ( pConInfo->ci.u.GuiInfo.WindowOrigin.x != MAXDWORD &&
                  pConInfo->ci.u.GuiInfo.WindowOrigin.y != MAXDWORD )
-                       {
-                               SetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_POS_LEFT, pConInfo->ci.u.GuiInfo.WindowOrigin.x, FALSE);
-                               SetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_POS_TOP, pConInfo->ci.u.GuiInfo.WindowOrigin.y, FALSE);
-                       }
-                       else
-                       {
-                               // FIXME: Calculate window pos from xres, yres
-                               SetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_POS_LEFT, 88, FALSE);
-                               SetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_POS_TOP, 88, FALSE);
-                               EnableWindow(GetDlgItem(hwndDlg, IDC_EDIT_WINDOW_POS_LEFT), FALSE);
-                               EnableWindow(GetDlgItem(hwndDlg, IDC_EDIT_WINDOW_POS_TOP), FALSE);
-                               EnableWindow(GetDlgItem(hwndDlg, IDC_UPDOWN_WINDOW_POS_LEFT), FALSE);
-                               EnableWindow(GetDlgItem(hwndDlg, IDC_UPDOWN_WINDOW_POS_TOP), FALSE);
-                               SendMessage(GetDlgItem(hwndDlg, IDC_CHECK_SYSTEM_POS_WINDOW), BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
-                       }
-
-                       return TRUE;
-               }
-               case WM_DRAWITEM:
-               {
-                       PaintConsole((LPDRAWITEMSTRUCT)lParam, pConInfo);
-                       return TRUE;
-               }
-               case WM_NOTIFY:
-               {
-                       lpnmud = (LPNMUPDOWN) lParam;
-                       lppsn = (LPPSHNOTIFY) lParam;
-
-                       if (lppsn->hdr.code == UDN_DELTAPOS)
-                       {
-                               DWORD wheight, wwidth;
-                               DWORD sheight, swidth;
-                               DWORD left, top;
-
-                               if (lppsn->hdr.idFrom == IDC_UPDOWN_WINDOW_SIZE_WIDTH)
-                               {
-                                       wwidth = lpnmud->iPos + lpnmud->iDelta;
-                               }
-                               else
-                               {
-                                       wwidth = GetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_SIZE_WIDTH, NULL, FALSE);
-                               }
-
-                               if (lppsn->hdr.idFrom == IDC_UPDOWN_WINDOW_SIZE_HEIGHT)
-                               {
-                                       wheight = lpnmud->iPos + lpnmud->iDelta;
-                               }
-                               else
-                               {
-                                       wheight = GetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_SIZE_HEIGHT, NULL, FALSE);
-                               }
-
-                               if (lppsn->hdr.idFrom == IDC_UPDOWN_SCREEN_BUFFER_WIDTH)
-                               {
-                                       swidth = lpnmud->iPos + lpnmud->iDelta;
-                               }
-                               else
-                               {
-                                       swidth = GetDlgItemInt(hwndDlg, IDC_EDIT_SCREEN_BUFFER_WIDTH, NULL, FALSE);
-                               }
-
-                               if (lppsn->hdr.idFrom == IDC_UPDOWN_SCREEN_BUFFER_HEIGHT)
-                               {
-                                       sheight = lpnmud->iPos + lpnmud->iDelta;
-                               }
-                               else
-                               {
-                                       sheight = GetDlgItemInt(hwndDlg, IDC_EDIT_SCREEN_BUFFER_HEIGHT, NULL, FALSE);
-                               }
-
-                               if (lppsn->hdr.idFrom == IDC_UPDOWN_WINDOW_POS_LEFT)
-                               {
-                                       left = lpnmud->iPos + lpnmud->iDelta;
-                               }
-                               else
-                               {
-                                       left = GetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_POS_LEFT, NULL, FALSE);
-                               }
-
-                               if (lppsn->hdr.idFrom == IDC_UPDOWN_WINDOW_POS_TOP)
-                               {
-                                       top = lpnmud->iPos + lpnmud->iDelta;
-                               }
-                               else
-                               {
-                                       top = GetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_POS_TOP, NULL, FALSE);
-                               }
-
-                               if (lppsn->hdr.idFrom == IDC_UPDOWN_WINDOW_SIZE_WIDTH || lppsn->hdr.idFrom == IDC_UPDOWN_WINDOW_SIZE_HEIGHT)
-                               {
-                                       /* Automatically adjust screen buffer size when window size enlarges */
-                                       if (wwidth >= swidth)
-                                       {
-                                               SetDlgItemInt(hwndDlg, IDC_EDIT_SCREEN_BUFFER_WIDTH, wwidth, TRUE);
-                                               swidth = wwidth;
-                                       }
-
-                                       if (wheight >= sheight)
-                                       {
-                                               SetDlgItemInt(hwndDlg, IDC_EDIT_SCREEN_BUFFER_HEIGHT, wheight, TRUE);
-                                               sheight = wheight;
-                                       }
-                               }
-                               swidth = max(swidth, 1);
-                               sheight = max(sheight, 1);
-
-                               if (lppsn->hdr.idFrom == IDC_UPDOWN_SCREEN_BUFFER_WIDTH || lppsn->hdr.idFrom == IDC_UPDOWN_SCREEN_BUFFER_HEIGHT)
-                               {
-                                       /* 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->ci.ScreenBufferSize = (COORD){swidth, sheight};
-                               pConInfo->ci.ConsoleSize = (COORD){wwidth, wheight};
-                               pConInfo->ci.u.GuiInfo.WindowOrigin = (POINT){left, top};
-                               PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
-                       }
-                       break;
-               }
-               case WM_COMMAND:
-               {
-                       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;
-                                               }
+            {
+                SetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_POS_LEFT, pConInfo->ci.u.GuiInfo.WindowOrigin.x, FALSE);
+                SetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_POS_TOP, pConInfo->ci.u.GuiInfo.WindowOrigin.y, FALSE);
+            }
+            else
+            {
+                // FIXME: Calculate window pos from xres, yres
+                SetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_POS_LEFT, 88, FALSE);
+                SetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_POS_TOP, 88, FALSE);
+                EnableWindow(GetDlgItem(hwndDlg, IDC_EDIT_WINDOW_POS_LEFT), FALSE);
+                EnableWindow(GetDlgItem(hwndDlg, IDC_EDIT_WINDOW_POS_TOP), FALSE);
+                EnableWindow(GetDlgItem(hwndDlg, IDC_UPDOWN_WINDOW_POS_LEFT), FALSE);
+                EnableWindow(GetDlgItem(hwndDlg, IDC_UPDOWN_WINDOW_POS_TOP), FALSE);
+                SendMessage(GetDlgItem(hwndDlg, IDC_CHECK_SYSTEM_POS_WINDOW), BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
+            }
+
+            return TRUE;
+        }
+        case WM_DRAWITEM:
+        {
+            PaintConsole((LPDRAWITEMSTRUCT)lParam, pConInfo);
+            return TRUE;
+        }
+        case WM_NOTIFY:
+        {
+            lpnmud = (LPNMUPDOWN) lParam;
+            lppsn = (LPPSHNOTIFY) lParam;
+
+            if (lppsn->hdr.code == UDN_DELTAPOS)
+            {
+                DWORD wheight, wwidth;
+                DWORD sheight, swidth;
+                DWORD left, top;
+
+                if (lppsn->hdr.idFrom == IDC_UPDOWN_WINDOW_SIZE_WIDTH)
+                {
+                    wwidth = lpnmud->iPos + lpnmud->iDelta;
+                }
+                else
+                {
+                    wwidth = GetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_SIZE_WIDTH, NULL, FALSE);
+                }
+
+                if (lppsn->hdr.idFrom == IDC_UPDOWN_WINDOW_SIZE_HEIGHT)
+                {
+                    wheight = lpnmud->iPos + lpnmud->iDelta;
+                }
+                else
+                {
+                    wheight = GetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_SIZE_HEIGHT, NULL, FALSE);
+                }
+
+                if (lppsn->hdr.idFrom == IDC_UPDOWN_SCREEN_BUFFER_WIDTH)
+                {
+                    swidth = lpnmud->iPos + lpnmud->iDelta;
+                }
+                else
+                {
+                    swidth = GetDlgItemInt(hwndDlg, IDC_EDIT_SCREEN_BUFFER_WIDTH, NULL, FALSE);
+                }
+
+                if (lppsn->hdr.idFrom == IDC_UPDOWN_SCREEN_BUFFER_HEIGHT)
+                {
+                    sheight = lpnmud->iPos + lpnmud->iDelta;
+                }
+                else
+                {
+                    sheight = GetDlgItemInt(hwndDlg, IDC_EDIT_SCREEN_BUFFER_HEIGHT, NULL, FALSE);
+                }
+
+                if (lppsn->hdr.idFrom == IDC_UPDOWN_WINDOW_POS_LEFT)
+                {
+                    left = lpnmud->iPos + lpnmud->iDelta;
+                }
+                else
+                {
+                    left = GetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_POS_LEFT, NULL, FALSE);
+                }
+
+                if (lppsn->hdr.idFrom == IDC_UPDOWN_WINDOW_POS_TOP)
+                {
+                    top = lpnmud->iPos + lpnmud->iDelta;
+                }
+                else
+                {
+                    top = GetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_POS_TOP, NULL, FALSE);
+                }
+
+                if (lppsn->hdr.idFrom == IDC_UPDOWN_WINDOW_SIZE_WIDTH || lppsn->hdr.idFrom == IDC_UPDOWN_WINDOW_SIZE_HEIGHT)
+                {
+                    /* Automatically adjust screen buffer size when window size enlarges */
+                    if (wwidth >= swidth)
+                    {
+                        SetDlgItemInt(hwndDlg, IDC_EDIT_SCREEN_BUFFER_WIDTH, wwidth, TRUE);
+                        swidth = wwidth;
+                    }
+
+                    if (wheight >= sheight)
+                    {
+                        SetDlgItemInt(hwndDlg, IDC_EDIT_SCREEN_BUFFER_HEIGHT, wheight, TRUE);
+                        sheight = wheight;
+                    }
+                }
+                swidth = max(swidth, 1);
+                sheight = max(sheight, 1);
+
+                if (lppsn->hdr.idFrom == IDC_UPDOWN_SCREEN_BUFFER_WIDTH || lppsn->hdr.idFrom == IDC_UPDOWN_SCREEN_BUFFER_HEIGHT)
+                {
+                    /* 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->ci.ScreenBufferSize = (COORD){swidth, sheight};
+                pConInfo->ci.ConsoleSize = (COORD){wwidth, wheight};
+                pConInfo->ci.u.GuiInfo.WindowOrigin = (POINT){left, top};
+                PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
+            }
+            break;
+        }
+        case WM_COMMAND:
+        {
+            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->ci.ScreenBufferSize = (COORD){swidth, sheight};
                         pConInfo->ci.ConsoleSize = (COORD){wwidth, wheight};
                         pConInfo->ci.u.GuiInfo.WindowOrigin = (POINT){left, top};
-                                               PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
-                                       }
-                                       break;
-                               }
-
-                               case IDC_CHECK_SYSTEM_POS_WINDOW:
-                               {
-                                       LONG res = SendMessage((HWND)lParam, BM_GETCHECK, 0, 0);
-                                       if (res == BST_CHECKED)
-                                       {
-                                               ULONG left, top;
-
-                                               left = GetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_POS_LEFT, NULL, FALSE);
-                                               top = GetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_POS_TOP, NULL, FALSE);
-                                               pConInfo->ci.u.GuiInfo.WindowOrigin = (POINT){left, top};
-                                               SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_UNCHECKED, 0);
-                                               EnableWindow(GetDlgItem(hwndDlg, IDC_EDIT_WINDOW_POS_LEFT), TRUE);
-                                               EnableWindow(GetDlgItem(hwndDlg, IDC_EDIT_WINDOW_POS_TOP), TRUE);
-                                               EnableWindow(GetDlgItem(hwndDlg, IDC_UPDOWN_WINDOW_POS_LEFT), TRUE);
-                                               EnableWindow(GetDlgItem(hwndDlg, IDC_UPDOWN_WINDOW_POS_TOP), TRUE);
-                                       }
-                                       else if (res == BST_UNCHECKED)
-                                       {
+                        PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
+                    }
+                    break;
+                }
+
+                case IDC_CHECK_SYSTEM_POS_WINDOW:
+                {
+                    LONG res = SendMessage((HWND)lParam, BM_GETCHECK, 0, 0);
+                    if (res == BST_CHECKED)
+                    {
+                        ULONG left, top;
+
+                        left = GetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_POS_LEFT, NULL, FALSE);
+                        top = GetDlgItemInt(hwndDlg, IDC_EDIT_WINDOW_POS_TOP, NULL, FALSE);
+                        pConInfo->ci.u.GuiInfo.WindowOrigin = (POINT){left, top};
+                        SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_UNCHECKED, 0);
+                        EnableWindow(GetDlgItem(hwndDlg, IDC_EDIT_WINDOW_POS_LEFT), TRUE);
+                        EnableWindow(GetDlgItem(hwndDlg, IDC_EDIT_WINDOW_POS_TOP), TRUE);
+                        EnableWindow(GetDlgItem(hwndDlg, IDC_UPDOWN_WINDOW_POS_LEFT), TRUE);
+                        EnableWindow(GetDlgItem(hwndDlg, IDC_UPDOWN_WINDOW_POS_TOP), TRUE);
+                    }
+                    else if (res == BST_UNCHECKED)
+                    {
                         pConInfo->ci.u.GuiInfo.WindowOrigin = (POINT){UINT_MAX, UINT_MAX};
-                                               SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
-                                               EnableWindow(GetDlgItem(hwndDlg, IDC_EDIT_WINDOW_POS_LEFT), FALSE);
-                                               EnableWindow(GetDlgItem(hwndDlg, IDC_EDIT_WINDOW_POS_TOP), FALSE);
-                                               EnableWindow(GetDlgItem(hwndDlg, IDC_UPDOWN_WINDOW_POS_LEFT), FALSE);
-                                               EnableWindow(GetDlgItem(hwndDlg, IDC_UPDOWN_WINDOW_POS_TOP), FALSE);
-                                       }
-                               }
-                       }
-               }
-               default:
-                       break;
-       }
-
-       return FALSE;
+                        SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
+                        EnableWindow(GetDlgItem(hwndDlg, IDC_EDIT_WINDOW_POS_LEFT), FALSE);
+                        EnableWindow(GetDlgItem(hwndDlg, IDC_EDIT_WINDOW_POS_TOP), FALSE);
+                        EnableWindow(GetDlgItem(hwndDlg, IDC_UPDOWN_WINDOW_POS_LEFT), FALSE);
+                        EnableWindow(GetDlgItem(hwndDlg, IDC_UPDOWN_WINDOW_POS_TOP), FALSE);
+                    }
+                }
+            }
+        }
+        default:
+            break;
+    }
+
+    return FALSE;
 }
index c174396..90aca0a 100644 (file)
@@ -19,241 +19,241 @@ OptionsProc(HWND hwndDlg,
             WPARAM wParam,
             LPARAM lParam)
 {
-       PCONSOLE_PROPS pConInfo;
-       LRESULT lResult;
-       HWND hDlgCtrl;
+    PCONSOLE_PROPS pConInfo;
+    LRESULT lResult;
+    HWND hDlgCtrl;
     LPPSHNOTIFY lppsn;
 
-       pConInfo = (PCONSOLE_PROPS)GetWindowLongPtr(hwndDlg, DWLP_USER);
+    pConInfo = (PCONSOLE_PROPS)GetWindowLongPtr(hwndDlg, DWLP_USER);
 
-       switch (uMsg)
-       {
-               case WM_INITDIALOG:
-               {
-                       pConInfo = (PCONSOLE_PROPS)((LPPROPSHEETPAGE)lParam)->lParam;
-                       SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pConInfo);
-                       UpdateDialogElements(hwndDlg, pConInfo);
-                       return TRUE;
-               }
-               case WM_NOTIFY:
-               {
-                       if (!pConInfo)
-                       {
-                               break;
-                       }
-                       lppsn = (LPPSHNOTIFY) lParam;
+    switch (uMsg)
+    {
+        case WM_INITDIALOG:
+        {
+            pConInfo = (PCONSOLE_PROPS)((LPPROPSHEETPAGE)lParam)->lParam;
+            SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pConInfo);
+            UpdateDialogElements(hwndDlg, pConInfo);
+            return TRUE;
+        }
+        case WM_NOTIFY:
+        {
+            if (!pConInfo)
+            {
+                break;
+            }
+            lppsn = (LPPSHNOTIFY) lParam;
             if (lppsn->hdr.code == UDN_DELTAPOS)
             {
-                               hDlgCtrl = GetDlgItem(hwndDlg, IDC_EDIT_BUFFER_SIZE);
-                               pConInfo->ci.HistoryBufferSize = LOWORD(SendMessage(hDlgCtrl, UDM_GETPOS, 0, 0));
+                hDlgCtrl = GetDlgItem(hwndDlg, IDC_EDIT_BUFFER_SIZE);
+                pConInfo->ci.HistoryBufferSize = LOWORD(SendMessage(hDlgCtrl, UDM_GETPOS, 0, 0));
 
-                               hDlgCtrl = GetDlgItem(hwndDlg, IDC_EDIT_NUM_BUFFER);
-                               pConInfo->ci.NumberOfHistoryBuffers = LOWORD(SendMessage(hDlgCtrl, UDM_GETPOS, 0, 0));
-                               PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
-                       }
-                       else if (lppsn->hdr.code == PSN_APPLY)
-                       {
-                               if (!pConInfo->AppliedConfig)
-                               {
-                                       return ApplyConsoleInfo(hwndDlg, pConInfo);
-                               }
-                               else
-                               {
-                                       /* Options have already been applied */
-                                       SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, PSNRET_NOERROR);
-                                       return TRUE;
-                               }
-                       }
-                       break;
-               }
-               case WM_COMMAND:
-               {
-                       if (!pConInfo)
-                       {
-                               break;
-                       }
-                       switch (LOWORD(wParam))
-                       {
-                               case IDC_RADIO_SMALL_CURSOR:
-                               {
-                                       pConInfo->ci.CursorSize = 0;
-                                       PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
-                                       break;
-                               }
-                               case IDC_RADIO_MEDIUM_CURSOR:
-                               {
-                                       pConInfo->ci.CursorSize = 50;
-                                       PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
-                                       break;
-                               }
-                               case IDC_RADIO_LARGE_CURSOR:
-                               {
-                                       pConInfo->ci.CursorSize = 100;
-                                       PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
-                                       break;
-                               }
-                               case IDC_RADIO_DISPLAY_WINDOW:
-                               {
-                                       pConInfo->ci.FullScreen = FALSE;
-                                       PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
-                                       break;
-                               }
-                               case IDC_RADIO_DISPLAY_FULL:
-                               {
-                                       pConInfo->ci.FullScreen = TRUE;
-                                       PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
-                                       break;
-                               }
-                               case IDC_CHECK_QUICK_EDIT:
-                               {
+                hDlgCtrl = GetDlgItem(hwndDlg, IDC_EDIT_NUM_BUFFER);
+                pConInfo->ci.NumberOfHistoryBuffers = LOWORD(SendMessage(hDlgCtrl, UDM_GETPOS, 0, 0));
+                PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
+            }
+            else if (lppsn->hdr.code == PSN_APPLY)
+            {
+                if (!pConInfo->AppliedConfig)
+                {
+                    return ApplyConsoleInfo(hwndDlg, pConInfo);
+                }
+                else
+                {
+                    /* Options have already been applied */
+                    SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, PSNRET_NOERROR);
+                    return TRUE;
+                }
+            }
+            break;
+        }
+        case WM_COMMAND:
+        {
+            if (!pConInfo)
+            {
+                break;
+            }
+            switch (LOWORD(wParam))
+            {
+                case IDC_RADIO_SMALL_CURSOR:
+                {
+                    pConInfo->ci.CursorSize = 0;
+                    PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
+                    break;
+                }
+                case IDC_RADIO_MEDIUM_CURSOR:
+                {
+                    pConInfo->ci.CursorSize = 50;
+                    PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
+                    break;
+                }
+                case IDC_RADIO_LARGE_CURSOR:
+                {
+                    pConInfo->ci.CursorSize = 100;
+                    PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
+                    break;
+                }
+                case IDC_RADIO_DISPLAY_WINDOW:
+                {
+                    pConInfo->ci.FullScreen = FALSE;
+                    PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
+                    break;
+                }
+                case IDC_RADIO_DISPLAY_FULL:
+                {
+                    pConInfo->ci.FullScreen = TRUE;
+                    PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
+                    break;
+                }
+                case IDC_CHECK_QUICK_EDIT:
+                {
                     lResult = SendMessage((HWND)lParam, BM_GETCHECK, (WPARAM)0, (LPARAM)0);
                     if (lResult == BST_CHECKED)
                     {
-                                               pConInfo->ci.QuickEdit = FALSE;
+                        pConInfo->ci.QuickEdit = FALSE;
                         SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_UNCHECKED, (LPARAM)0);
                     }
                     else if (lResult == BST_UNCHECKED)
                     {
-                                               pConInfo->ci.QuickEdit = TRUE;
+                        pConInfo->ci.QuickEdit = TRUE;
                         SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_CHECKED, (LPARAM)0);
                     }
-                                       PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
-                                       break;
-                               }
-                               case IDC_CHECK_INSERT_MODE:
-                               {
+                    PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
+                    break;
+                }
+                case IDC_CHECK_INSERT_MODE:
+                {
                     lResult = SendMessage((HWND)lParam, BM_GETCHECK, (WPARAM)0, (LPARAM)0);
                     if (lResult == BST_CHECKED)
                     {
-                                               pConInfo->ci.InsertMode = FALSE;
+                        pConInfo->ci.InsertMode = FALSE;
                         SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_UNCHECKED, (LPARAM)0);
                     }
                     else if (lResult == BST_UNCHECKED)
                     {
-                                               pConInfo->ci.InsertMode = TRUE;
+                        pConInfo->ci.InsertMode = TRUE;
                         SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_CHECKED, (LPARAM)0);
                     }
-                                       PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
-                                       break;
-                               }
-                               case IDC_CHECK_DISCARD_DUPLICATES:
-                               {
+                    PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
+                    break;
+                }
+                case IDC_CHECK_DISCARD_DUPLICATES:
+                {
                    lResult = SendMessage((HWND)lParam, BM_GETCHECK, (WPARAM)0, (LPARAM)0);
                     if (lResult == BST_CHECKED)
                     {
-                                               pConInfo->ci.HistoryNoDup = FALSE;
+                        pConInfo->ci.HistoryNoDup = FALSE;
                         SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_UNCHECKED, (LPARAM)0);
                     }
                     else if (lResult == BST_UNCHECKED)
                     {
-                                               pConInfo->ci.HistoryNoDup = TRUE;
+                        pConInfo->ci.HistoryNoDup = TRUE;
                         SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_CHECKED, (LPARAM)0);
                     }
-                                       PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
-                                       break;
-                               }
-                               default:
-                                       break;
-                       }
-                       break;
-               }
-               default:
-                       break;
-       }
+                    PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
+                    break;
+                }
+                default:
+                    break;
+            }
+            break;
+        }
+        default:
+            break;
+    }
 
-       return FALSE;
+    return FALSE;
 }
 
 static
 void
 UpdateDialogElements(HWND hwndDlg, PCONSOLE_PROPS pConInfo)
 {
-  HWND hDlgCtrl;
-  TCHAR szBuffer[MAX_PATH];
+    HWND hDlgCtrl;
+    TCHAR szBuffer[MAX_PATH];
 
-       /* Update cursor size */
-       if (pConInfo->ci.CursorSize == 0)
-       {
-               /* Small cursor */
-               hDlgCtrl = GetDlgItem(hwndDlg, IDC_RADIO_SMALL_CURSOR);
-               SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
+    /* Update cursor size */
+    if (pConInfo->ci.CursorSize == 0)
+    {
+        /* Small cursor */
+        hDlgCtrl = GetDlgItem(hwndDlg, IDC_RADIO_SMALL_CURSOR);
+        SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
 
-               hDlgCtrl = GetDlgItem(hwndDlg, IDC_RADIO_MEDIUM_CURSOR);
-               SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_UNCHECKED, 0);
-               hDlgCtrl = GetDlgItem(hwndDlg, IDC_RADIO_LARGE_CURSOR);
-               SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_UNCHECKED, 0);
-       }
-       else if (pConInfo->ci.CursorSize == 50)
-       {
-               hDlgCtrl = GetDlgItem(hwndDlg, IDC_RADIO_MEDIUM_CURSOR);
-               SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
+        hDlgCtrl = GetDlgItem(hwndDlg, IDC_RADIO_MEDIUM_CURSOR);
+        SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_UNCHECKED, 0);
+        hDlgCtrl = GetDlgItem(hwndDlg, IDC_RADIO_LARGE_CURSOR);
+        SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_UNCHECKED, 0);
+    }
+    else if (pConInfo->ci.CursorSize == 50)
+    {
+        hDlgCtrl = GetDlgItem(hwndDlg, IDC_RADIO_MEDIUM_CURSOR);
+        SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
 
-               hDlgCtrl = GetDlgItem(hwndDlg, IDC_RADIO_SMALL_CURSOR);
-               SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_UNCHECKED, 0);
-               hDlgCtrl = GetDlgItem(hwndDlg, IDC_RADIO_LARGE_CURSOR);
-               SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_UNCHECKED, 0);
-       }
-       else if (pConInfo->ci.CursorSize == 100)
-       {
-               hDlgCtrl = GetDlgItem(hwndDlg, IDC_RADIO_LARGE_CURSOR);
-               SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
+        hDlgCtrl = GetDlgItem(hwndDlg, IDC_RADIO_SMALL_CURSOR);
+        SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_UNCHECKED, 0);
+        hDlgCtrl = GetDlgItem(hwndDlg, IDC_RADIO_LARGE_CURSOR);
+        SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_UNCHECKED, 0);
+    }
+    else if (pConInfo->ci.CursorSize == 100)
+    {
+        hDlgCtrl = GetDlgItem(hwndDlg, IDC_RADIO_LARGE_CURSOR);
+        SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
 
-               hDlgCtrl = GetDlgItem(hwndDlg, IDC_RADIO_SMALL_CURSOR);
-               SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_UNCHECKED, 0);
-               hDlgCtrl = GetDlgItem(hwndDlg, IDC_RADIO_MEDIUM_CURSOR);
-               SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_UNCHECKED, 0);
-       }
+        hDlgCtrl = GetDlgItem(hwndDlg, IDC_RADIO_SMALL_CURSOR);
+        SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_UNCHECKED, 0);
+        hDlgCtrl = GetDlgItem(hwndDlg, IDC_RADIO_MEDIUM_CURSOR);
+        SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_UNCHECKED, 0);
+    }
 
-       /* Update num buffers */
-       hDlgCtrl = GetDlgItem(hwndDlg, IDC_UPDOWN_NUM_BUFFER);
-       SendMessage(hDlgCtrl, UDM_SETRANGE, 0, MAKELONG((short)999, (short)1));
-       hDlgCtrl = GetDlgItem(hwndDlg, IDC_EDIT_NUM_BUFFER);
-       _stprintf(szBuffer, _T("%d"), pConInfo->ci.NumberOfHistoryBuffers);
-       SendMessage(hDlgCtrl, WM_SETTEXT, 0, (LPARAM)szBuffer);
+    /* Update num buffers */
+    hDlgCtrl = GetDlgItem(hwndDlg, IDC_UPDOWN_NUM_BUFFER);
+    SendMessage(hDlgCtrl, UDM_SETRANGE, 0, MAKELONG((short)999, (short)1));
+    hDlgCtrl = GetDlgItem(hwndDlg, IDC_EDIT_NUM_BUFFER);
+    _stprintf(szBuffer, _T("%d"), pConInfo->ci.NumberOfHistoryBuffers);
+    SendMessage(hDlgCtrl, WM_SETTEXT, 0, (LPARAM)szBuffer);
 
-       /* Update buffer size */
-       hDlgCtrl = GetDlgItem(hwndDlg, IDC_UPDOWN_BUFFER_SIZE);
-       SendMessage(hDlgCtrl, UDM_SETRANGE, 0, MAKELONG((short)999, (short)1));
-       hDlgCtrl = GetDlgItem(hwndDlg, IDC_EDIT_BUFFER_SIZE);
-       _stprintf(szBuffer, _T("%d"), pConInfo->ci.HistoryBufferSize);
-       SendMessage(hDlgCtrl, WM_SETTEXT, 0, (LPARAM)szBuffer);
+    /* Update buffer size */
+    hDlgCtrl = GetDlgItem(hwndDlg, IDC_UPDOWN_BUFFER_SIZE);
+    SendMessage(hDlgCtrl, UDM_SETRANGE, 0, MAKELONG((short)999, (short)1));
+    hDlgCtrl = GetDlgItem(hwndDlg, IDC_EDIT_BUFFER_SIZE);
+    _stprintf(szBuffer, _T("%d"), pConInfo->ci.HistoryBufferSize);
+    SendMessage(hDlgCtrl, WM_SETTEXT, 0, (LPARAM)szBuffer);
 
-       /* Update discard duplicates */
-       hDlgCtrl = GetDlgItem(hwndDlg, IDC_CHECK_DISCARD_DUPLICATES);
-       if (pConInfo->ci.HistoryNoDup)
-               SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
-       else
-               SendMessage(hDlgCtrl, BM_SETCHECK, (LPARAM)BST_UNCHECKED, 0);
+    /* Update discard duplicates */
+    hDlgCtrl = GetDlgItem(hwndDlg, IDC_CHECK_DISCARD_DUPLICATES);
+    if (pConInfo->ci.HistoryNoDup)
+        SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
+    else
+        SendMessage(hDlgCtrl, BM_SETCHECK, (LPARAM)BST_UNCHECKED, 0);
 
-       /* Update full/window screen */
-       if (pConInfo->ci.FullScreen)
-       {
-               hDlgCtrl = GetDlgItem(hwndDlg, IDC_RADIO_DISPLAY_FULL);
-               SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
+    /* Update full/window screen */
+    if (pConInfo->ci.FullScreen)
+    {
+        hDlgCtrl = GetDlgItem(hwndDlg, IDC_RADIO_DISPLAY_FULL);
+        SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
 
-               hDlgCtrl = GetDlgItem(hwndDlg, IDC_RADIO_DISPLAY_WINDOW);
-               SendMessage(hDlgCtrl, BM_SETCHECK, (LPARAM)BST_UNCHECKED, 0);
-       }
-       else
-       {
-               hDlgCtrl = GetDlgItem(hwndDlg, IDC_RADIO_DISPLAY_WINDOW);
-               SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
+        hDlgCtrl = GetDlgItem(hwndDlg, IDC_RADIO_DISPLAY_WINDOW);
+        SendMessage(hDlgCtrl, BM_SETCHECK, (LPARAM)BST_UNCHECKED, 0);
+    }
+    else
+    {
+        hDlgCtrl = GetDlgItem(hwndDlg, IDC_RADIO_DISPLAY_WINDOW);
+        SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
 
-               hDlgCtrl = GetDlgItem(hwndDlg, IDC_RADIO_DISPLAY_FULL);
-               SendMessage(hDlgCtrl, BM_SETCHECK, (LPARAM)BST_UNCHECKED, 0);
-       }
+        hDlgCtrl = GetDlgItem(hwndDlg, IDC_RADIO_DISPLAY_FULL);
+        SendMessage(hDlgCtrl, BM_SETCHECK, (LPARAM)BST_UNCHECKED, 0);
+    }
 
-       /* Update quick edit */
-       hDlgCtrl = GetDlgItem(hwndDlg, IDC_CHECK_QUICK_EDIT);
-       if (pConInfo->ci.QuickEdit)
-               SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
-       else
-               SendMessage(hDlgCtrl, BM_SETCHECK, (LPARAM)BST_UNCHECKED, 0);
+    /* Update quick edit */
+    hDlgCtrl = GetDlgItem(hwndDlg, IDC_CHECK_QUICK_EDIT);
+    if (pConInfo->ci.QuickEdit)
+        SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
+    else
+        SendMessage(hDlgCtrl, BM_SETCHECK, (LPARAM)BST_UNCHECKED, 0);
 
-       /* Update insert mode */
-       hDlgCtrl = GetDlgItem(hwndDlg, IDC_CHECK_INSERT_MODE);
-       if (pConInfo->ci.InsertMode)
-               SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
-       else
-               SendMessage(hDlgCtrl, BM_SETCHECK, (LPARAM)BST_UNCHECKED, 0);
+    /* Update insert mode */
+    hDlgCtrl = GetDlgItem(hwndDlg, IDC_CHECK_INSERT_MODE);
+    if (pConInfo->ci.InsertMode)
+        SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
+    else
+        SendMessage(hDlgCtrl, BM_SETCHECK, (LPARAM)BST_UNCHECKED, 0);
 }
index f7a5e74..48e800b 100644 (file)
@@ -1,36 +1,36 @@
 #pragma once
 
-#define IDC_CPLICON                            40
-#define IDS_CPLNAME                            41
-#define IDS_CPLDESCRIPTION             42
-#define IDS_APPLY_SHORTCUT_ALL 43
+#define IDC_CPLICON             40
+#define IDS_CPLNAME             41
+#define IDS_CPLDESCRIPTION      42
+#define IDS_APPLY_SHORTCUT_ALL  43
 
-#define IDD_PROPPAGEOPTIONS            100
-#define IDD_PROPPAGEFONT               101
-#define IDD_PROPPAGELAYOUT             102
-#define IDD_PROPPAGECOLORS             103
-#define IDD_APPLYOPTIONS               104
+#define IDD_PROPPAGEOPTIONS     100
+#define IDD_PROPPAGEFONT        101
+#define IDD_PROPPAGELAYOUT      102
+#define IDD_PROPPAGECOLORS      103
+#define IDD_APPLYOPTIONS        104
 
 // Options dialog
-#define IDC_CHECK_QUICK_EDIT                   200
-#define IDC_CHECK_INSERT_MODE                  201
-#define IDC_CHECK_DISCARD_DUPLICATES   202
-#define IDC_EDIT_BUFFER_SIZE                   203
-#define IDC_UPDOWN_BUFFER_SIZE                 204
-#define IDC_EDIT_NUM_BUFFER                            205
-#define IDC_UPDOWN_NUM_BUFFER                  206
-#define IDC_RADIO_SMALL_CURSOR                 207
-#define IDC_RADIO_MEDIUM_CURSOR                        208
-#define        IDC_RADIO_LARGE_CURSOR                  209
-#define        IDC_RADIO_DISPLAY_WINDOW                210
-#define IDC_RADIO_DISPLAY_FULL                 211
+#define IDC_CHECK_QUICK_EDIT            200
+#define IDC_CHECK_INSERT_MODE           201
+#define IDC_CHECK_DISCARD_DUPLICATES    202
+#define IDC_EDIT_BUFFER_SIZE            203
+#define IDC_UPDOWN_BUFFER_SIZE          204
+#define IDC_EDIT_NUM_BUFFER             205
+#define IDC_UPDOWN_NUM_BUFFER           206
+#define IDC_RADIO_SMALL_CURSOR          207
+#define IDC_RADIO_MEDIUM_CURSOR         208
+#define        IDC_RADIO_LARGE_CURSOR          209
+#define        IDC_RADIO_DISPLAY_WINDOW        210
+#define IDC_RADIO_DISPLAY_FULL          211
 
 // Apply dialog
-#define IDC_RADIO_APPLY_ALL                            300
-#define IDC_RADIO_APPLY_CURRENT                        301
+#define IDC_RADIO_APPLY_ALL             300
+#define IDC_RADIO_APPLY_CURRENT         301
 
 // Font dialog
-#define IDC_CHECK_BOLD_FONTS                   400
+#define IDC_CHECK_BOLD_FONTS            400
 #define IDC_STATIC_SELECT_FONT_PREVIEW  401
 #define IDC_FONT_SIZE_X                 402
 #define IDC_FONT_SIZE_Y                 403
 #define IDC_GROUPBOX_FONT_NAME          407
 
 // Layout dialog
-#define IDC_UPDOWN_SCREEN_BUFFER_WIDTH   500
-#define IDC_EDIT_SCREEN_BUFFER_WIDTH     501
-#define IDC_EDIT_SCREEN_BUFFER_HEIGHT    502
-#define IDC_UPDOWN_SCREEN_BUFFER_HEIGHT  503
-#define IDC_EDIT_WINDOW_SIZE_WIDTH       504
-#define IDC_UPDOWN_WINDOW_SIZE_WIDTH     505
-#define IDC_EDIT_WINDOW_SIZE_HEIGHT      506
-#define IDC_UPDOWN_WINDOW_SIZE_HEIGHT    507
-#define IDC_EDIT_WINDOW_POS_LEFT         508
-#define IDC_UPDOWN_WINDOW_POS_LEFT       509
-#define IDC_EDIT_WINDOW_POS_TOP          510
-#define IDC_UPDOWN_WINDOW_POS_TOP        511
-#define IDC_CHECK_SYSTEM_POS_WINDOW      512
-#define IDC_STATIC_LAYOUT_WINDOW_PREVIEW 513
+#define IDC_UPDOWN_SCREEN_BUFFER_WIDTH      500
+#define IDC_EDIT_SCREEN_BUFFER_WIDTH        501
+#define IDC_EDIT_SCREEN_BUFFER_HEIGHT       502
+#define IDC_UPDOWN_SCREEN_BUFFER_HEIGHT     503
+#define IDC_EDIT_WINDOW_SIZE_WIDTH          504
+#define IDC_UPDOWN_WINDOW_SIZE_WIDTH        505
+#define IDC_EDIT_WINDOW_SIZE_HEIGHT         506
+#define IDC_UPDOWN_WINDOW_SIZE_HEIGHT       507
+#define IDC_EDIT_WINDOW_POS_LEFT            508
+#define IDC_UPDOWN_WINDOW_POS_LEFT          509
+#define IDC_EDIT_WINDOW_POS_TOP             510
+#define IDC_UPDOWN_WINDOW_POS_TOP           511
+#define IDC_CHECK_SYSTEM_POS_WINDOW         512
+#define IDC_STATIC_LAYOUT_WINDOW_PREVIEW    513
 
 // Color dialog
 #define IDC_RADIO_SCREEN_TEXT           600
@@ -86,5 +86,5 @@
 #define IDC_STATIC_COLOR16              627
 
 // String IDs
-#define IDS_SCREEN_TEXT                                        700
-#define IDS_RASTERFONTS                                        701
+#define IDS_SCREEN_TEXT                 700
+#define IDS_RASTERFONTS                 701