Author: hbelusca
Date: Mon May 8 17:33:33 2017
New Revision: 74504
URL:
http://svn.reactos.org/svn/reactos?rev=74504&view=rev
Log:
[CONSOLE.CPL]: Fix the console window preview:
- turn it into a custom control;
- supports dynamic preview area depending on the actual current monitor screen
resolution;
(note that on ReactOS, the WM_DISPLAYCHANGE is not correctly sent, see CORE-13212,
therefore this functionality won't show up yet)
- supports correct rescaling of the console preview drawn in the preview area;
- supports dependence of the console preview with respect to the chosen font character
dimensions.
The code is there, it may be a little bit improved in the future.
CORE-13196 #resolve
Other additions:
- Add a few space between the console preview text window border and the text sample;
- PaintText and PaintStaticControls do not need to return anything.
Modified:
trunk/reactos/dll/cpl/console/colors.c
trunk/reactos/dll/cpl/console/console.c
trunk/reactos/dll/cpl/console/console.h
trunk/reactos/dll/cpl/console/font.c
trunk/reactos/dll/cpl/console/lang/bg-BG.rc
trunk/reactos/dll/cpl/console/lang/cs-CZ.rc
trunk/reactos/dll/cpl/console/lang/de-DE.rc
trunk/reactos/dll/cpl/console/lang/en-US.rc
trunk/reactos/dll/cpl/console/lang/es-ES.rc
trunk/reactos/dll/cpl/console/lang/fr-FR.rc
trunk/reactos/dll/cpl/console/lang/he-IL.rc
trunk/reactos/dll/cpl/console/lang/id-ID.rc
trunk/reactos/dll/cpl/console/lang/it-IT.rc
trunk/reactos/dll/cpl/console/lang/ja-JP.rc
trunk/reactos/dll/cpl/console/lang/no-NO.rc
trunk/reactos/dll/cpl/console/lang/pl-PL.rc
trunk/reactos/dll/cpl/console/lang/pt-BR.rc
trunk/reactos/dll/cpl/console/lang/ro-RO.rc
trunk/reactos/dll/cpl/console/lang/ru-RU.rc
trunk/reactos/dll/cpl/console/lang/sk-SK.rc
trunk/reactos/dll/cpl/console/lang/sq-AL.rc
trunk/reactos/dll/cpl/console/lang/tr-TR.rc
trunk/reactos/dll/cpl/console/lang/uk-UA.rc
trunk/reactos/dll/cpl/console/lang/zh-CN.rc
trunk/reactos/dll/cpl/console/lang/zh-TW.rc
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?r…
==============================================================================
--- trunk/reactos/dll/cpl/console/colors.c [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/console/colors.c [iso-8859-1] Mon May 8 17:33:33 2017
@@ -14,11 +14,10 @@
static DWORD ActiveStaticControl = 0;
-static BOOL
+static VOID
PaintStaticControls(
- IN HWND hDlg,
- IN PCONSOLE_STATE_INFO pConInfo,
- IN LPDRAWITEMSTRUCT drawItem)
+ IN LPDRAWITEMSTRUCT drawItem,
+ IN PCONSOLE_STATE_INFO pConInfo)
{
HBRUSH hBrush;
DWORD index;
@@ -27,15 +26,13 @@
ARRAYSIZE(pConInfo->ColorTable) - 1);
hBrush = CreateSolidBrush(pConInfo->ColorTable[index]);
- if (!hBrush) return FALSE;
+ if (!hBrush) return;
FillRect(drawItem->hDC, &drawItem->rcItem, hBrush);
DeleteObject(hBrush);
if (ActiveStaticControl == index)
DrawFocusRect(drawItem->hDC, &drawItem->rcItem);
-
- return TRUE;
}
INT_PTR CALLBACK
@@ -67,14 +64,14 @@
{
LPDRAWITEMSTRUCT drawItem = (LPDRAWITEMSTRUCT)lParam;
- if (drawItem->CtlID >= IDC_STATIC_COLOR1 && drawItem->CtlID
<= IDC_STATIC_COLOR16)
- return PaintStaticControls(hDlg, ConInfo, drawItem);
+ if (IDC_STATIC_COLOR1 <= drawItem->CtlID && drawItem->CtlID
<= IDC_STATIC_COLOR16)
+ PaintStaticControls(drawItem, ConInfo);
else if (drawItem->CtlID == IDC_STATIC_SCREEN_COLOR)
- return PaintText(drawItem, ConInfo, Screen);
+ PaintText(drawItem, ConInfo, Screen);
else if (drawItem->CtlID == IDC_STATIC_POPUP_COLOR)
- return PaintText(drawItem, ConInfo, Popup);
-
- break;
+ PaintText(drawItem, ConInfo, Popup);
+
+ return TRUE;
}
case WM_NOTIFY:
Modified: trunk/reactos/dll/cpl/console/console.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/console/console.c?…
==============================================================================
--- trunk/reactos/dll/cpl/console/console.c [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/console/console.c [iso-8859-1] Mon May 8 17:33:33 2017
@@ -256,7 +256,9 @@
InitPropSheetPage(&psp[i++], IDD_PROPPAGECOLORS , ColorsProc );
/* Display the property sheet */
+ RegisterWinPrevClass(hApplet);
Result = PropertySheetW(&psh);
+ UnRegisterWinPrevClass(hApplet);
/* First cleanup */
if (hCurrentFont) DeleteObject(hCurrentFont);
Modified: trunk/reactos/dll/cpl/console/console.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/console/console.h?…
==============================================================================
--- trunk/reactos/dll/cpl/console/console.h [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/console/console.h [iso-8859-1] Mon May 8 17:33:33 2017
@@ -42,12 +42,17 @@
VOID ApplyConsoleInfo(HWND hwndDlg);
-VOID
-PaintConsole(
- IN LPDRAWITEMSTRUCT drawItem,
- IN PCONSOLE_STATE_INFO pConInfo);
+/* Preview Windows */
+BOOL
+RegisterWinPrevClass(
+ IN HINSTANCE hInstance);
BOOL
+UnRegisterWinPrevClass(
+ IN HINSTANCE hInstance);
+
+
+VOID
PaintText(
IN LPDRAWITEMSTRUCT drawItem,
IN PCONSOLE_STATE_INFO pConInfo,
Modified: trunk/reactos/dll/cpl/console/font.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/console/font.c?rev…
==============================================================================
--- trunk/reactos/dll/cpl/console/font.c [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/console/font.c [iso-8859-1] Mon May 8 17:33:33 2017
@@ -716,12 +716,18 @@
{
LPDRAWITEMSTRUCT drawItem = (LPDRAWITEMSTRUCT)lParam;
- if (drawItem->CtlID == IDC_STATIC_FONT_WINDOW_PREVIEW)
- PaintConsole(drawItem, ConInfo);
- else if (drawItem->CtlID == IDC_STATIC_SELECT_FONT_PREVIEW)
+ if (drawItem->CtlID == IDC_STATIC_SELECT_FONT_PREVIEW)
PaintText(drawItem, ConInfo, Screen);
return TRUE;
+ }
+
+ case WM_DISPLAYCHANGE:
+ {
+ /* Retransmit to the preview window */
+ SendDlgItemMessageW(hDlg, IDC_STATIC_FONT_WINDOW_PREVIEW,
+ WM_DISPLAYCHANGE, wParam, lParam);
+ break;
}
case WM_NOTIFY:
Modified: trunk/reactos/dll/cpl/console/lang/bg-BG.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/console/lang/bg-BG…
==============================================================================
--- trunk/reactos/dll/cpl/console/lang/bg-BG.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/console/lang/bg-BG.rc [iso-8859-1] Mon May 8 17:33:33 2017
@@ -35,7 +35,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "ÐÑозоÑеÑен пÑеглед:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
LTEXT "РазмеÑ:", IDC_STATIC, 130, 7, 45, 10
LISTBOX IDC_LBOX_FONTSIZE, 130, 20, 50, 86, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL |
WS_TABSTOP
COMBOBOX IDC_CBOX_FONTSIZE, 130, 20, 30, 86, CBS_SIMPLE | CBS_SORT | WS_VSCROLL |
WS_TABSTOP
@@ -58,7 +58,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "ÐÑозоÑеÑен пÑеглед:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
GROUPBOX "Ð Ð°Ð·Ð¼ÐµÑ Ð½Ð° екÑÐ°Ð½Ð½Ð¸Ñ Ð±ÑÑеÑ", IDC_STATIC, 130,
12, 135, 50
LTEXT "&ШиÑина:", IDC_STATIC, 140, 28, 40, 10
LTEXT "&ÐиÑоÑина:", IDC_STATIC, 140, 46, 39, 10
Modified: trunk/reactos/dll/cpl/console/lang/cs-CZ.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/console/lang/cs-CZ…
==============================================================================
--- trunk/reactos/dll/cpl/console/lang/cs-CZ.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/console/lang/cs-CZ.rc [iso-8859-1] Mon May 8 17:33:33 2017
@@ -41,7 +41,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Náhled okna:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
LTEXT "Velikost:", IDC_STATIC, 130, 7, 45, 10
LISTBOX IDC_LBOX_FONTSIZE, 130, 20, 50, 86, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL |
WS_TABSTOP
COMBOBOX IDC_CBOX_FONTSIZE, 130, 20, 30, 86, CBS_SIMPLE | CBS_SORT | WS_VSCROLL |
WS_TABSTOP
@@ -64,7 +64,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Náhled okna:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
GROUPBOX "Velikost pamÄti zobrazenÃ", IDC_STATIC, 130, 12, 115, 50
LTEXT "&Å ÃÅka:", IDC_STATIC, 140, 28, 40, 10
LTEXT "&Výška:", IDC_STATIC, 140, 46, 39, 10
Modified: trunk/reactos/dll/cpl/console/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/console/lang/de-DE…
==============================================================================
--- trunk/reactos/dll/cpl/console/lang/de-DE.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/console/lang/de-DE.rc [iso-8859-1] Mon May 8 17:33:33 2017
@@ -37,7 +37,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Fenstervorschau:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
LTEXT "GröÃe:", IDC_STATIC, 130, 7, 45, 10
LISTBOX IDC_LBOX_FONTSIZE, 130, 20, 50, 86, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL |
WS_TABSTOP
COMBOBOX IDC_CBOX_FONTSIZE, 130, 20, 30, 86, CBS_SIMPLE | CBS_SORT | WS_VSCROLL |
WS_TABSTOP
@@ -60,7 +60,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Fenstervorschau:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
GROUPBOX "FensterpuffergröÃe", IDC_STATIC, 130, 15, 115, 40
LTEXT "&Breite:", IDC_STATIC, 135, 30, 25, 10
LTEXT "&Höhe:", IDC_STATIC, 135, 40, 25, 10
Modified: trunk/reactos/dll/cpl/console/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/console/lang/en-US…
==============================================================================
--- trunk/reactos/dll/cpl/console/lang/en-US.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/console/lang/en-US.rc [iso-8859-1] Mon May 8 17:33:33 2017
@@ -35,7 +35,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Window Preview:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
LTEXT "Size:", IDC_STATIC, 130, 7, 45, 10
LISTBOX IDC_LBOX_FONTSIZE, 130, 20, 50, 86, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL |
WS_TABSTOP
COMBOBOX IDC_CBOX_FONTSIZE, 130, 20, 30, 86, CBS_SIMPLE | CBS_SORT | WS_VSCROLL |
WS_TABSTOP
@@ -58,7 +58,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Window Preview:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
GROUPBOX "Screen Buffer Size", IDC_STATIC, 130, 12, 115, 50
LTEXT "&Width:", IDC_STATIC, 140, 28, 40, 10
LTEXT "&Height:", IDC_STATIC, 140, 46, 39, 10
Modified: trunk/reactos/dll/cpl/console/lang/es-ES.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/console/lang/es-ES…
==============================================================================
--- trunk/reactos/dll/cpl/console/lang/es-ES.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/console/lang/es-ES.rc [iso-8859-1] Mon May 8 17:33:33 2017
@@ -37,7 +37,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Ventana de Previsualización:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
LTEXT "Tamaño:", IDC_STATIC, 130, 7, 45, 10
LISTBOX IDC_LBOX_FONTSIZE, 130, 20, 50, 86, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL |
WS_TABSTOP
COMBOBOX IDC_CBOX_FONTSIZE, 130, 20, 30, 86, CBS_SIMPLE | CBS_SORT | WS_VSCROLL |
WS_TABSTOP
@@ -60,7 +60,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Ventana de Previsualización:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
GROUPBOX "Tamaño del Búfer de Pantalla", IDC_STATIC, 130, 15, 115, 40
LTEXT "&Anchura:", IDC_STATIC, 135, 30, 25, 10
LTEXT "A<ura:", IDC_STATIC, 135, 40, 25, 10
Modified: trunk/reactos/dll/cpl/console/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/console/lang/fr-FR…
==============================================================================
--- trunk/reactos/dll/cpl/console/lang/fr-FR.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/console/lang/fr-FR.rc [iso-8859-1] Mon May 8 17:33:33 2017
@@ -37,7 +37,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Fenêtre de Prévisualisation :", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
LTEXT "Taille :", IDC_STATIC, 130, 7, 45, 10
LISTBOX IDC_LBOX_FONTSIZE, 130, 20, 50, 86, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL |
WS_TABSTOP
COMBOBOX IDC_CBOX_FONTSIZE, 130, 20, 30, 86, CBS_SIMPLE | CBS_SORT | WS_VSCROLL |
WS_TABSTOP
@@ -60,7 +60,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Fenêtre de Prévisualisation :", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
GROUPBOX "Taille du buffer de l'écran", IDC_STATIC, 130, 12, 115, 50
LTEXT "&Largeur :", IDC_STATIC, 140, 28, 40, 10
LTEXT "&Hauteur :", IDC_STATIC, 140, 46, 39, 10
Modified: trunk/reactos/dll/cpl/console/lang/he-IL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/console/lang/he-IL…
==============================================================================
--- trunk/reactos/dll/cpl/console/lang/he-IL.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/console/lang/he-IL.rc [iso-8859-1] Mon May 8 17:33:33 2017
@@ -37,7 +37,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "תצ××× ×ק××××:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
LTEXT "××××:", IDC_STATIC, 130, 7, 45, 10
LISTBOX IDC_LBOX_FONTSIZE, 130, 20, 50, 86, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL |
WS_TABSTOP
COMBOBOX IDC_CBOX_FONTSIZE, 130, 20, 30, 86, CBS_SIMPLE | CBS_SORT | WS_VSCROLL |
WS_TABSTOP
@@ -60,7 +60,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "תצ××× ×ק××××:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
GROUPBOX "×××× ×ת××× ××ס×", IDC_STATIC, 130, 12, 115, 50
LTEXT "ר×××:", IDC_STATIC, 140, 28, 40, 10
LTEXT "××××:", IDC_STATIC, 140, 46, 39, 10
Modified: trunk/reactos/dll/cpl/console/lang/id-ID.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/console/lang/id-ID…
==============================================================================
--- trunk/reactos/dll/cpl/console/lang/id-ID.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/console/lang/id-ID.rc [iso-8859-1] Mon May 8 17:33:33 2017
@@ -37,7 +37,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Tinjauan Jendela:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
LTEXT "Ukuran:", IDC_STATIC, 130, 7, 45, 10
LISTBOX IDC_LBOX_FONTSIZE, 130, 20, 50, 86, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL |
WS_TABSTOP
COMBOBOX IDC_CBOX_FONTSIZE, 130, 20, 30, 86, CBS_SIMPLE | CBS_SORT | WS_VSCROLL |
WS_TABSTOP
@@ -60,7 +60,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Tinjauan Jendela:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
GROUPBOX "Ukuran Bufer Layar", IDC_STATIC, 130, 15, 115, 40
LTEXT "&Panjang:", IDC_STATIC, 135, 30, 25, 10
LTEXT "&Tinggi:", IDC_STATIC, 135, 40, 25, 10
Modified: trunk/reactos/dll/cpl/console/lang/it-IT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/console/lang/it-IT…
==============================================================================
--- trunk/reactos/dll/cpl/console/lang/it-IT.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/console/lang/it-IT.rc [iso-8859-1] Mon May 8 17:33:33 2017
@@ -37,7 +37,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Anteprima:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
LTEXT "Dimansione:", IDC_STATIC, 130, 7, 45, 10
LISTBOX IDC_LBOX_FONTSIZE, 130, 20, 50, 86, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL |
WS_TABSTOP
COMBOBOX IDC_CBOX_FONTSIZE, 130, 20, 30, 86, CBS_SIMPLE | CBS_SORT | WS_VSCROLL |
WS_TABSTOP
@@ -60,7 +60,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Anteprima:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
GROUPBOX "Dimensione del buffer dello schermo", IDC_STATIC, 130, 15, 115,
40
LTEXT "&Larghezza:", IDC_STATIC, 135, 30, 25, 10
LTEXT "&Altezza:", IDC_STATIC, 135, 40, 25, 10
Modified: trunk/reactos/dll/cpl/console/lang/ja-JP.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/console/lang/ja-JP…
==============================================================================
--- trunk/reactos/dll/cpl/console/lang/ja-JP.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/console/lang/ja-JP.rc [iso-8859-1] Mon May 8 17:33:33 2017
@@ -35,7 +35,7 @@
FONT 9, "MS UI Gothic"
BEGIN
LTEXT "ã¦ã£ã³ãã¦ã®ãã¬ãã¥ã¼:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
LTEXT "ãµã¤ãº:", IDC_STATIC, 130, 7, 45, 10
LISTBOX IDC_LBOX_FONTSIZE, 130, 20, 50, 86, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL |
WS_TABSTOP
COMBOBOX IDC_CBOX_FONTSIZE, 130, 20, 30, 86, CBS_SIMPLE | CBS_SORT | WS_VSCROLL |
WS_TABSTOP
@@ -58,7 +58,7 @@
FONT 9, "MS UI Gothic"
BEGIN
LTEXT "ã¦ã£ã³ãã¦ã®ãã¬ãã¥ã¼:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
GROUPBOX "ã¹ã¯ãªã¼ã³ãããã¡ã¼ã®ãµã¤ãº", IDC_STATIC, 130, 12,
115, 50
LTEXT "å¹
(&W):", IDC_STATIC, 140, 28, 40, 10
LTEXT "é«ã(&H):", IDC_STATIC, 140, 46, 39, 10
Modified: trunk/reactos/dll/cpl/console/lang/no-NO.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/console/lang/no-NO…
==============================================================================
--- trunk/reactos/dll/cpl/console/lang/no-NO.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/console/lang/no-NO.rc [iso-8859-1] Mon May 8 17:33:33 2017
@@ -35,7 +35,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Vindu forhåndsvisning:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
LTEXT "Størrelse:", IDC_STATIC, 130, 7, 45, 10
LISTBOX IDC_LBOX_FONTSIZE, 130, 20, 50, 86, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL |
WS_TABSTOP
COMBOBOX IDC_CBOX_FONTSIZE, 130, 20, 30, 86, CBS_SIMPLE | CBS_SORT | WS_VSCROLL |
WS_TABSTOP
@@ -58,7 +58,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Vindu forhåndsvisning:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
GROUPBOX "Størrelse på skjermbuffer", IDC_STATIC, 130, 12, 115, 50
LTEXT "&Bredde:", IDC_STATIC, 140, 28, 40, 10
LTEXT "&Høyde:", IDC_STATIC, 140, 46, 39, 10
Modified: trunk/reactos/dll/cpl/console/lang/pl-PL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/console/lang/pl-PL…
==============================================================================
--- trunk/reactos/dll/cpl/console/lang/pl-PL.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/console/lang/pl-PL.rc [iso-8859-1] Mon May 8 17:33:33 2017
@@ -42,7 +42,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Okno podglÄ
du:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
LTEXT "Rozmiar:", IDC_STATIC, 130, 7, 45, 10
LISTBOX IDC_LBOX_FONTSIZE, 130, 20, 50, 86, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL |
WS_TABSTOP
COMBOBOX IDC_CBOX_FONTSIZE, 130, 20, 30, 86, CBS_SIMPLE | CBS_SORT | WS_VSCROLL |
WS_TABSTOP
@@ -65,7 +65,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Okno podglÄ
du:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
GROUPBOX "Rozmiar bufora ekranu", IDC_STATIC, 130, 15, 115, 40
LTEXT "&SzerokoÅÄ:", IDC_STATIC, 135, 30, 25, 10
LTEXT "&WysokoÅÄ:", IDC_STATIC, 135, 40, 25, 10
Modified: trunk/reactos/dll/cpl/console/lang/pt-BR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/console/lang/pt-BR…
==============================================================================
--- trunk/reactos/dll/cpl/console/lang/pt-BR.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/console/lang/pt-BR.rc [iso-8859-1] Mon May 8 17:33:33 2017
@@ -35,7 +35,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Visualização da janela:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
LTEXT "&Tamanho:", IDC_STATIC, 130, 7, 45, 10
LISTBOX IDC_LBOX_FONTSIZE, 130, 20, 50, 86, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL |
WS_TABSTOP
COMBOBOX IDC_CBOX_FONTSIZE, 130, 20, 30, 86, CBS_SIMPLE | CBS_SORT | WS_VSCROLL |
WS_TABSTOP
@@ -58,7 +58,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Visualização da janela:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
GROUPBOX "Tamanho do buffer de tela", IDC_STATIC, 130, 12, 115, 50
LTEXT "&Largura:", IDC_STATIC, 140, 28, 40, 10
LTEXT "&Altura:", IDC_STATIC, 140, 46, 39, 10
Modified: trunk/reactos/dll/cpl/console/lang/ro-RO.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/console/lang/ro-RO…
==============================================================================
--- trunk/reactos/dll/cpl/console/lang/ro-RO.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/console/lang/ro-RO.rc [iso-8859-1] Mon May 8 17:33:33 2017
@@ -44,7 +44,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Previzionare:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
LTEXT "MÄrime:", IDC_STATIC, 130, 7, 45, 10
LISTBOX IDC_LBOX_FONTSIZE, 130, 20, 50, 86, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL |
WS_TABSTOP
COMBOBOX IDC_CBOX_FONTSIZE, 130, 20, 30, 86, CBS_SIMPLE | CBS_SORT | WS_VSCROLL |
WS_TABSTOP
@@ -67,7 +67,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Previzionare:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
GROUPBOX "Dimensiunea textului", IDC_STATIC, 130, 12, 115, 50
LTEXT "&Coloane:", IDC_STATIC, 140, 28, 40, 10
LTEXT "&Rânduri:", IDC_STATIC, 140, 46, 39, 10
Modified: trunk/reactos/dll/cpl/console/lang/ru-RU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/console/lang/ru-RU…
==============================================================================
--- trunk/reactos/dll/cpl/console/lang/ru-RU.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/console/lang/ru-RU.rc [iso-8859-1] Mon May 8 17:33:33 2017
@@ -37,7 +37,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Ðкно пÑедпÑоÑмоÑÑа:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
LTEXT "РазмеÑ:", IDC_STATIC, 130, 7, 45, 10
LISTBOX IDC_LBOX_FONTSIZE, 130, 20, 50, 86, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL |
WS_TABSTOP
COMBOBOX IDC_CBOX_FONTSIZE, 130, 20, 30, 86, CBS_SIMPLE | CBS_SORT | WS_VSCROLL |
WS_TABSTOP
@@ -60,7 +60,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Ðкно пÑедпÑоÑмоÑÑа:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
GROUPBOX "Ð Ð°Ð·Ð¼ÐµÑ Ð±ÑÑеÑа ÑкÑана", IDC_STATIC, 130, 12,
115, 50
LTEXT "&ШиÑина:", IDC_STATIC, 140, 28, 40, 10
LTEXT "&ÐÑÑоÑа:", IDC_STATIC, 140, 46, 39, 10
Modified: trunk/reactos/dll/cpl/console/lang/sk-SK.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/console/lang/sk-SK…
==============================================================================
--- trunk/reactos/dll/cpl/console/lang/sk-SK.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/console/lang/sk-SK.rc [iso-8859-1] Mon May 8 17:33:33 2017
@@ -39,7 +39,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Ukážka okna:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
LTEXT "Veľkosť:", IDC_STATIC, 130, 7, 45, 10
LISTBOX IDC_LBOX_FONTSIZE, 130, 20, 50, 86, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL |
WS_TABSTOP
COMBOBOX IDC_CBOX_FONTSIZE, 130, 20, 30, 86, CBS_SIMPLE | CBS_SORT | WS_VSCROLL |
WS_TABSTOP
@@ -62,7 +62,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Ukážka okna:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
GROUPBOX "Screen Buffer Size", IDC_STATIC, 130, 12, 115, 50
LTEXT "&Width:", IDC_STATIC, 140, 28, 40, 10
LTEXT "&Height:", IDC_STATIC, 140, 46, 39, 10
Modified: trunk/reactos/dll/cpl/console/lang/sq-AL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/console/lang/sq-AL…
==============================================================================
--- trunk/reactos/dll/cpl/console/lang/sq-AL.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/console/lang/sq-AL.rc [iso-8859-1] Mon May 8 17:33:33 2017
@@ -39,7 +39,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Dritare Preview:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
LTEXT "Masë:", IDC_STATIC, 130, 7, 45, 10
LISTBOX IDC_LBOX_FONTSIZE, 130, 20, 50, 86, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL |
WS_TABSTOP
COMBOBOX IDC_CBOX_FONTSIZE, 130, 20, 30, 86, CBS_SIMPLE | CBS_SORT | WS_VSCROLL |
WS_TABSTOP
@@ -62,7 +62,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Dritare Preview:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
GROUPBOX "Masa e Ekranit Buffer", IDC_STATIC, 130, 12, 115, 50
LTEXT "Gjerë:", IDC_STATIC, 140, 28, 40, 10
LTEXT "Gjatë:", IDC_STATIC, 140, 46, 39, 10
Modified: trunk/reactos/dll/cpl/console/lang/tr-TR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/console/lang/tr-TR…
==============================================================================
--- trunk/reactos/dll/cpl/console/lang/tr-TR.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/console/lang/tr-TR.rc [iso-8859-1] Mon May 8 17:33:33 2017
@@ -37,7 +37,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Pencere Ãn Ä°zlemesi:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
LTEXT "&Boyutlar:", IDC_STATIC, 130, 7, 45, 10
LISTBOX IDC_LBOX_FONTSIZE, 130, 20, 50, 86, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL |
WS_TABSTOP
COMBOBOX IDC_CBOX_FONTSIZE, 130, 20, 30, 86, CBS_SIMPLE | CBS_SORT | WS_VSCROLL |
WS_TABSTOP
@@ -60,7 +60,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Pencere Ãn Ä°zlemesi:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
GROUPBOX "Görüntülük ArabelleÄi Boyutları", IDC_STATIC, 130, 12, 115,
50
LTEXT "&GeniÅlik:", IDC_STATIC, 140, 28, 40, 10
LTEXT "&Yükseklik:", IDC_STATIC, 140, 46, 39, 10
Modified: trunk/reactos/dll/cpl/console/lang/uk-UA.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/console/lang/uk-UA…
==============================================================================
--- trunk/reactos/dll/cpl/console/lang/uk-UA.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/console/lang/uk-UA.rc [iso-8859-1] Mon May 8 17:33:33 2017
@@ -37,7 +37,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "ÐÑазок вÑкна:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
LTEXT "Size:", IDC_STATIC, 130, 7, 45, 10
LISTBOX IDC_LBOX_FONTSIZE, 130, 20, 50, 86, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL |
WS_TABSTOP
COMBOBOX IDC_CBOX_FONTSIZE, 130, 20, 30, 86, CBS_SIMPLE | CBS_SORT | WS_VSCROLL |
WS_TABSTOP
@@ -60,7 +60,7 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "ÐÑазок вÑкна:", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
GROUPBOX "РозмÑÑ Ð±ÑÑеÑа екÑана", IDC_STATIC, 130, 12,
115, 50
LTEXT "&ШиÑина:", IDC_STATIC, 140, 28, 40, 10
LTEXT "&ÐиÑоÑа:", IDC_STATIC, 140, 46, 39, 10
Modified: trunk/reactos/dll/cpl/console/lang/zh-CN.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/console/lang/zh-CN…
==============================================================================
--- trunk/reactos/dll/cpl/console/lang/zh-CN.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/console/lang/zh-CN.rc [iso-8859-1] Mon May 8 17:33:33 2017
@@ -37,7 +37,7 @@
FONT 9, "MS Shell Dlg"
BEGIN
LTEXT "çªå£é¢è§ï¼", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
LTEXT "大å°ï¼", IDC_STATIC, 130, 7, 45, 10
LISTBOX IDC_LBOX_FONTSIZE, 130, 20, 50, 86, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL |
WS_TABSTOP
COMBOBOX IDC_CBOX_FONTSIZE, 130, 20, 30, 86, CBS_SIMPLE | CBS_SORT | WS_VSCROLL |
WS_TABSTOP
@@ -60,7 +60,7 @@
FONT 9, "MS Shell Dlg"
BEGIN
LTEXT "çªå£é¢è§ï¼", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
GROUPBOX "å±å¹ç¼å²åºå¤§å°", IDC_STATIC, 130, 12, 115, 50
LTEXT "宽(&W)ï¼", IDC_STATIC, 140, 28, 40, 10
LTEXT "é«(&H)ï¼", IDC_STATIC, 140, 46, 39, 10
Modified: trunk/reactos/dll/cpl/console/lang/zh-TW.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/console/lang/zh-TW…
==============================================================================
--- trunk/reactos/dll/cpl/console/lang/zh-TW.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/console/lang/zh-TW.rc [iso-8859-1] Mon May 8 17:33:33 2017
@@ -37,7 +37,7 @@
FONT 9, "MS Shell Dlg"
BEGIN
LTEXT "è¦çªé 覽ï¼", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
LTEXT "大å°ï¼", IDC_STATIC, 130, 7, 45, 10
LISTBOX IDC_LBOX_FONTSIZE, 130, 20, 50, 86, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL |
WS_TABSTOP
COMBOBOX IDC_CBOX_FONTSIZE, 130, 20, 30, 86, CBS_SIMPLE | CBS_SORT | WS_VSCROLL |
WS_TABSTOP
@@ -60,7 +60,7 @@
FONT 9, "MS Shell Dlg"
BEGIN
LTEXT "è¦çªé 覽ï¼", IDC_STATIC, 7, 7, 115, 10
- CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "Static",
SS_OWNERDRAW | SS_SUNKEN, 7, 20, 115, 70, WS_EX_CLIENTEDGE
+ CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "WinPreview",
WS_BORDER | WS_CHILD | WS_VISIBLE, 7, 20, 115, 70
GROUPBOX "è¢å¹ç·©è¡å大å°", IDC_STATIC, 130, 12, 115, 50
LTEXT "寬(&W)ï¼", IDC_STATIC, 140, 28, 40, 10
LTEXT "é«(&H)ï¼", IDC_STATIC, 140, 46, 39, 10
Modified: trunk/reactos/dll/cpl/console/layout.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/console/layout.c?r…
==============================================================================
--- trunk/reactos/dll/cpl/console/layout.c [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/console/layout.c [iso-8859-1] Mon May 8 17:33:33 2017
@@ -11,6 +11,448 @@
#define NDEBUG
#include <debug.h>
+
+/* CONSOLE WINDOW PREVIEW Control *********************************************/
+
+#define WIN_PREVIEW_CLASS L"WinPreview"
+
+typedef struct _WINPREV_DATA
+{
+ HWND hWnd; // The window which this structure refers to
+ RECT rcMaxArea; // Maximum rectangle in which the preview window can be sized
+ SIZE siPreview; // Actual size of the preview window
+ SIZE siVirtScr; // Width and Height of the virtual screen
+ PVOID pData; // Private data
+} WINPREV_DATA, *PWINPREV_DATA;
+
+static LRESULT CALLBACK
+WinPrevProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
+
+BOOL
+RegisterWinPrevClass(
+ IN HINSTANCE hInstance)
+{
+ WNDCLASSW WndClass;
+
+ WndClass.lpszClassName = WIN_PREVIEW_CLASS;
+ WndClass.lpfnWndProc = WinPrevProc;
+ WndClass.style = 0;
+ WndClass.hInstance = hInstance;
+ WndClass.hIcon = NULL;
+ WndClass.hCursor = LoadCursorW(NULL, MAKEINTRESOURCEW(IDC_ARROW));
+ WndClass.hbrBackground = (HBRUSH)(COLOR_BACKGROUND + 1);
+ WndClass.lpszMenuName = NULL;
+ WndClass.cbClsExtra = 0;
+ WndClass.cbWndExtra = 0; // sizeof(PWINPREV_DATA);
+
+ return (RegisterClassW(&WndClass) != 0);
+}
+
+BOOL
+UnRegisterWinPrevClass(
+ IN HINSTANCE hInstance)
+{
+ return UnregisterClassW(WIN_PREVIEW_CLASS, hInstance);
+}
+
+static VOID
+WinPrev_OnDisplayChange(
+ IN PWINPREV_DATA pData)
+{
+ // RECT rcNew;
+
+ pData->siVirtScr.cx = GetSystemMetrics(SM_CXVIRTUALSCREEN);
+ pData->siVirtScr.cy = GetSystemMetrics(SM_CYVIRTUALSCREEN);
+
+ /*
+ * The rescaling factor "siPreview / siVirtScr" should be the minimum of
the ratios
+ * pData->rcMaxArea.right / pData->siVirtScr.cx , and
+ * pData->rcMaxArea.bottom / pData->siVirtScr.cy ,
+ * or equivalently, the maximum of the inverse of these ratios.
+ * This condition is equivalent to the following inequality being tested.
+ */
+ // if (pData->siVirtScr.cx / pData->rcMaxArea.right >=
pData->siVirtScr.cy / pData->rcMaxArea.bottom)
+ if (pData->siVirtScr.cx * pData->rcMaxArea.bottom >= pData->siVirtScr.cy
* pData->rcMaxArea.right)
+ {
+ pData->siPreview.cx = MulDiv(pData->siVirtScr.cx,
pData->rcMaxArea.right, pData->siVirtScr.cx);
+ pData->siPreview.cy = MulDiv(pData->siVirtScr.cy,
pData->rcMaxArea.right, pData->siVirtScr.cx);
+ }
+ else
+ {
+ pData->siPreview.cx = MulDiv(pData->siVirtScr.cx,
pData->rcMaxArea.bottom, pData->siVirtScr.cy);
+ pData->siPreview.cy = MulDiv(pData->siVirtScr.cy,
pData->rcMaxArea.bottom, pData->siVirtScr.cy);
+ }
+
+ /*
+ * Now, the lengths in screen-units can be rescaled into preview-units with:
+ * MulDiv(cx, pData->siPreview.cx, pData->siVirtScr.cx);
+ * and:
+ * MulDiv(cy, pData->siPreview.cy, pData->siVirtScr.cy);
+ */
+
+#if 0 // TODO: Investigate!
+ /*
+ * Since both rcMaxArea and siPreview are client window area sizes,
+ * transform them into window sizes.
+ */
+ SetRect(&rcNew, 0, 0, pData->siPreview.cx, pData->siPreview.cy);
+ AdjustWindowRect(&rcNew,
+ WS_BORDER,
+ // GetWindowLongPtrW(pData->hWnd, GWL_STYLE) &
~WS_OVERLAPPED,
+ FALSE);
+ OffsetRect(&rcNew, -rcNew.left, -rcNew.top);
+ rcNew.right += 2;
+ rcNew.bottom += 2;
+#endif
+
+ SetWindowPos(pData->hWnd,
+ 0 /* HWND_TOP */,
+ 0, 0,
+ pData->siPreview.cx, pData->siPreview.cy,
+ // rcNew.right, rcNew.bottom,
+ SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
+}
+
+#define RescaleCX(pData, len) \
+ MulDiv((len), (pData)->siPreview.cx, (pData)->siVirtScr.cx)
+
+#define RescaleCY(pData, len) \
+ MulDiv((len), (pData)->siPreview.cy, (pData)->siVirtScr.cy)
+
+#define RescaleRect(pData, rect) \
+do { \
+ (rect).left = RescaleCX((pData), (rect).left); \
+ (rect).right = RescaleCX((pData), (rect).right); \
+ (rect).top = RescaleCY((pData), (rect).top); \
+ (rect).bottom = RescaleCY((pData), (rect).bottom); \
+} while (0)
+
+#if 0
+static VOID
+WinPrev_OnSize(VOID)
+{
+}
+#endif
+
+static VOID
+WinPrev_OnDraw(
+ IN HDC hDC,
+ IN PWINPREV_DATA pData)
+{
+ PCONSOLE_STATE_INFO pConInfo = (PCONSOLE_STATE_INFO)pData->pData;
+ HBRUSH hBrush;
+ RECT rcWin, fRect;
+ SIZE /*siBorder,*/ siFrame, siButton, siScroll;
+ SIZE resize;
+
+ RECT rcItem;
+
+ GetClientRect(pData->hWnd, &rcItem);
+
+ /*
+ * Retrieve some system metrics and rescale them.
+ * They will be added separately, so that to always round the sizes up.
+ */
+
+ /* Don't care about border as it is almost always 1 and <= frame size */
+ /* Example: Frame = 4, or 13 ... while Border = 1 */
+ // siBorder.cx = GetSystemMetrics(SM_CXBORDER);
+ // siBorder.cy = GetSystemMetrics(SM_CYBORDER);
+
+ /* Window frame size */
+ siFrame.cx = GetSystemMetrics(SM_CXFRAME);
+ if (siFrame.cx > 0)
+ {
+ siFrame.cx = RescaleCX(pData, siFrame.cx);
+ siFrame.cx = max(1, siFrame.cx);
+ }
+ siFrame.cy = GetSystemMetrics(SM_CYFRAME);
+ if (siFrame.cy > 0)
+ {
+ siFrame.cy = RescaleCY(pData, siFrame.cy);
+ siFrame.cy = max(1, siFrame.cy);
+ }
+
+ /* Window caption buttons */
+ siButton.cx = GetSystemMetrics(SM_CXSIZE);
+ siButton.cx = RescaleCX(pData, siButton.cx);
+ siButton.cx = max(1, siButton.cx);
+
+ siButton.cy = GetSystemMetrics(SM_CYSIZE);
+ siButton.cy = RescaleCY(pData, siButton.cy);
+ siButton.cy = max(1, siButton.cy);
+
+ /* Enlarge them for improving their appearance */
+ // siButton.cx *= 2;
+ siButton.cy *= 2;
+
+ /* Dimensions of the scrollbars */
+ siScroll.cx = GetSystemMetrics(SM_CXVSCROLL);
+ siScroll.cx = RescaleCX(pData, siScroll.cx);
+ siScroll.cx = max(1, siScroll.cx);
+
+ siScroll.cy = GetSystemMetrics(SM_CYHSCROLL);
+ siScroll.cy = RescaleCY(pData, siScroll.cy);
+ siScroll.cy = max(1, siScroll.cy);
+
+
+ // FIXME: Use SM_CXMIN, SM_CYMIN ??
+
+
+ /*
+ * Compute the console window layout
+ */
+
+ /* We start with the console client area, rescaled for the preview */
+ SetRect(&rcWin, 0, 0,
+ pConInfo->WindowSize.X * pConInfo->FontSize.X,
+ pConInfo->WindowSize.Y * pConInfo->FontSize.Y);
+ RescaleRect(pData, rcWin);
+
+ /* Add the scrollbars if needed (does not account for any frame) */
+ if (pConInfo->WindowSize.X < pConInfo->ScreenBufferSize.X)
+ {
+ /* Horizontal scrollbar */
+ rcWin.bottom += siScroll.cy;
+ // NOTE: If an additional exterior frame is needed, add +1
+ }
+ else
+ {
+ /* No scrollbar */
+ siScroll.cy = 0;
+ }
+ if (pConInfo->WindowSize.Y < pConInfo->ScreenBufferSize.Y)
+ {
+ /* Vertical scrollbar */
+ rcWin.right += siScroll.cx;
+ // NOTE: If an additional exterior frame is needed, add +1
+ }
+ else
+ {
+ /* No scrollbar */
+ siScroll.cx = 0;
+ }
+
+ /* Add the title bar, taking into account the frames */
+ rcWin.top -= siButton.cy - 1;
+
+ /* If we have a non-zero window frame size, add an interior border and the frame */
+ resize.cx = (siFrame.cx > 0 ? 1 + siFrame.cx : 0);
+ resize.cy = (siFrame.cy > 0 ? 1 + siFrame.cy : 0);
+
+ /* Add the outer border */
+ ++resize.cx, ++resize.cy;
+
+ InflateRect(&rcWin, resize.cx, resize.cy);
+
+ /* Finally, move the window rectangle back to its correct origin */
+ OffsetRect(&rcWin, -rcWin.left, -rcWin.top);
+
+ if ( pConInfo->WindowPosition.x == MAXDWORD &&
+ pConInfo->WindowPosition.y == MAXDWORD )
+ {
+ // OffsetRect(&rcWin, (rcItem.right - rcItem.left) / 3, (rcItem.bottom -
rcItem.top) / 3);
+ OffsetRect(&rcWin, 0, 0);
+ }
+ else
+ {
+ OffsetRect(&rcWin,
+ RescaleCX(pData, pConInfo->WindowPosition.x),
+ RescaleCY(pData, pConInfo->WindowPosition.y));
+ }
+
+
+ /*
+ * Paint the preview window
+ */
+
+ /* Fill the background with desktop colour */
+ FillRect(hDC, &rcItem, GetSysColorBrush(COLOR_BACKGROUND));
+
+ /*
+ * Draw the exterior frame. Use 'FillRect' instead of 'FrameRect'
+ * so that, when we want to draw frames around other elements,
+ * we can just instead separate them with space instead of redrawing
+ * a frame with 'FrameRect'.
+ */
+ FillRect(hDC, &rcWin, GetSysColorBrush(COLOR_WINDOWFRAME));
+ InflateRect(&rcWin, -1, -1);
+
+ /* Draw the border */
+ hBrush = GetSysColorBrush(COLOR_ACTIVEBORDER);
+ if (siFrame.cx > 0)
+ {
+ SetRect(&fRect, rcWin.left, rcWin.top, rcWin.left + siFrame.cx,
rcWin.bottom);
+ FillRect(hDC, &fRect, hBrush);
+ SetRect(&fRect, rcWin.right - siFrame.cx, rcWin.top, rcWin.right,
rcWin.bottom);
+ FillRect(hDC, &fRect, hBrush);
+
+ InflateRect(&rcWin, -siFrame.cx, 0);
+ }
+ if (siFrame.cy > 0)
+ {
+ SetRect(&fRect, rcWin.left, rcWin.top, rcWin.right, rcWin.top + siFrame.cy);
+ FillRect(hDC, &fRect, hBrush);
+ SetRect(&fRect, rcWin.left, rcWin.bottom - siFrame.cy, rcWin.right,
rcWin.bottom);
+ FillRect(hDC, &fRect, hBrush);
+
+ InflateRect(&rcWin, 0, -siFrame.cy);
+ }
+
+ /* Draw the interior frame if we had a border */
+ if (siFrame.cx > 0 || siFrame.cy > 0)
+ {
+#if 0 // See the remark above
+ SetRect(&fRect, rcWin.left, rcWin.top, rcWin.right, rcWin.bottom);
+ FrameRect(hDC, &fRect, GetSysColorBrush(COLOR_WINDOWFRAME));
+#endif
+ InflateRect(&rcWin, (siFrame.cx > 0 ? -1 : 0), (siFrame.cy > 0 ? -1 :
0));
+ }
+
+ /* Draw the console window title bar */
+ hBrush = GetSysColorBrush(COLOR_BTNFACE);
+
+ /* Draw the system menu (left button) */
+ SetRect(&fRect, rcWin.left, rcWin.top, rcWin.left + siButton.cx, rcWin.top +
siButton.cy - 2);
+ // DrawFrameControl(hDC, &fRect, DFC_CAPTION, DFCS_CAPTIONCLOSE);
+ FillRect(hDC, &fRect, hBrush);
+ fRect.right++; // Separation
+
+ /* Draw the caption bar */
+ SetRect(&fRect, fRect.right, fRect.top, rcWin.right - 2 * (siButton.cx + 1),
fRect.bottom);
+ FillRect(hDC, &fRect, GetSysColorBrush(COLOR_ACTIVECAPTION));
+ fRect.right++; // Separation
+
+ /* Draw the minimize menu (first right button) */
+ SetRect(&fRect, fRect.right, fRect.top, fRect.right + siButton.cx,
fRect.bottom);
+ // DrawFrameControl(hDC, &fRect, DFC_CAPTION, DFCS_CAPTIONMIN);
+ FillRect(hDC, &fRect, hBrush);
+ fRect.right++; // Separation
+
+ /* Draw the maximize menu (second right button) */
+ SetRect(&fRect, fRect.right, fRect.top, fRect.right + siButton.cx,
fRect.bottom);
+ // DrawFrameControl(hDC, &fRect, DFC_CAPTION, DFCS_CAPTIONMAX);
+ FillRect(hDC, &fRect, hBrush);
+
+ rcWin.top += siButton.cy - 1;
+
+ /* Add the scrollbars if needed */
+ if (siScroll.cy > 0 || siScroll.cx > 0)
+ {
+ LONG right, bottom;
+
+ right = rcWin.right;
+ bottom = rcWin.bottom;
+
+ /*
+ * If both the horizontal and vertical scrollbars are present,
+ * reserve some space for the "dead square" at the bottom right.
+ */
+ if (siScroll.cy > 0 && siScroll.cx > 0)
+ {
+ right -= (1 + siScroll.cx);
+ bottom -= (1 + siScroll.cy);
+ }
+
+ hBrush = GetSysColorBrush(COLOR_SCROLLBAR);
+
+ /* Horizontal scrollbar */
+ if (siScroll.cy > 0)
+ {
+ SetRect(&fRect, rcWin.left, rcWin.bottom - siScroll.cy, right,
rcWin.bottom);
+ FillRect(hDC, &fRect, hBrush);
+ }
+
+ /* Vertical scrollbar */
+ if (siScroll.cx > 0)
+ {
+ SetRect(&fRect, rcWin.right - siScroll.cx, rcWin.top, rcWin.right,
bottom);
+ FillRect(hDC, &fRect, hBrush);
+ }
+
+ /*
+ * If both the horizontal and vertical scrollbars are present,
+ * draw the "dead square" at the bottom right.
+ */
+ if (siScroll.cy > 0 && siScroll.cx > 0)
+ {
+ SetRect(&fRect, rcWin.right - siScroll.cx, rcWin.bottom - siScroll.cy,
rcWin.right, rcWin.bottom);
+ FillRect(hDC, &fRect, hBrush);
+ }
+
+ // NOTE: If an additional exterior frame is needed, remove +1 for each direction
+ rcWin.right -= siScroll.cx;
+ rcWin.bottom -= siScroll.cy;
+ }
+
+ /* Draw the console background */
+ hBrush =
CreateSolidBrush(pConInfo->ColorTable[BkgdAttribFromAttrib(pConInfo->ScreenAttributes)]);
+ FillRect(hDC, &rcWin, hBrush);
+ DeleteObject(hBrush);
+}
+
+static LRESULT CALLBACK
+WinPrevProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ PWINPREV_DATA pData;
+
+ pData = (PWINPREV_DATA)GetWindowLongPtrW(hWnd, GWLP_USERDATA);
+
+ switch (msg)
+ {
+ case WM_CREATE:
+ {
+ pData = (PWINPREV_DATA)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
sizeof(*pData));
+ if (!pData)
+ {
+ /* We failed to allocate our private data, halt the window creation */
+ return (LRESULT)-1;
+ }
+ pData->hWnd = hWnd;
+ pData->pData = ConInfo;
+ GetClientRect(pData->hWnd, &pData->rcMaxArea);
+ // LPCREATESTRUCT::cx and cy give window (not client) size
+ WinPrev_OnDisplayChange(pData);
+ SetWindowLongPtrW(hWnd, GWLP_USERDATA, (LONG_PTR)pData);
+ break;
+ }
+
+ case WM_DESTROY:
+ {
+ if (pData)
+ HeapFree(GetProcessHeap(), 0, pData);
+ break;
+ }
+
+ case WM_DISPLAYCHANGE:
+ {
+ WinPrev_OnDisplayChange(pData);
+ UpdateWindow(hWnd);
+ // InvalidateRect(hWnd, NULL, FALSE);
+ break;
+ }
+
+ case WM_SIZE:
+ break;
+
+ case WM_ERASEBKGND:
+ return 1;
+
+ case WM_PAINT:
+ {
+ PAINTSTRUCT ps;
+ BeginPaint(hWnd, &ps);
+ WinPrev_OnDraw(ps.hdc, pData);
+ EndPaint(hWnd, &ps);
+ return 0;
+ }
+ }
+
+ return DefWindowProcW(hWnd, msg, wParam, lParam);
+}
+
+
+/* CONSOLE TEXT PREVIEW *******************************************************/
const WCHAR szPreviewText[] =
L"C:\\ReactOS> dir \n" \
@@ -22,80 +464,7 @@
L"setuplog txt 313 13-04-15 5:00a\n" \
L"win ini 7005 13-04-15 5:00a\n" ;
-
VOID
-PaintConsole(
- IN LPDRAWITEMSTRUCT drawItem,
- IN PCONSOLE_STATE_INFO pConInfo)
-{
- HBRUSH hBrush;
- RECT cRect, fRect;
- DWORD startx, starty;
- DWORD endx, endy;
- DWORD sizex, sizey;
-
- FillRect(drawItem->hDC, &drawItem->rcItem,
GetSysColorBrush(COLOR_BACKGROUND));
-
- // FIXME: Use: SM_CXSIZE, SM_CYSIZE, SM_CXVSCROLL, SM_CYHSCROLL, SM_CXMIN, SM_CYMIN,
SM_CXFRAME, SM_CYFRAME
- /* Use it for scaling */
- sizex = drawItem->rcItem.right - drawItem->rcItem.left;
- sizey = drawItem->rcItem.bottom - drawItem->rcItem.top ;
-
- if ( pConInfo->WindowPosition.x == MAXDWORD &&
- pConInfo->WindowPosition.y == MAXDWORD )
- {
- startx = sizex / 3;
- starty = sizey / 3;
- }
- else
- {
- // TODO:
- // Calculate pos correctly when console centered
- startx = pConInfo->WindowPosition.x;
- starty = pConInfo->WindowPosition.y;
- }
-
- // TODO:
- // Stretch console when bold fonts are selected
- endx = startx + pConInfo->WindowSize.X; // drawItem->rcItem.right - startx +
15;
- endy = starty + pConInfo->WindowSize.Y; // 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->ColorTable[BkgdAttribFromAttrib(pConInfo->ScreenAttributes)]);
- SetRect(&fRect, startx + 3, starty + 6, cRect.right - 6, cRect.bottom - 3);
- FillRect(drawItem->hDC, &fRect, hBrush);
- DeleteObject(hBrush);
-}
-
-BOOL
PaintText(
IN LPDRAWITEMSTRUCT drawItem,
IN PCONSOLE_STATE_INFO pConInfo,
@@ -112,35 +481,38 @@
else if (TextMode == Popup)
CurrentAttrib = pConInfo->PopupAttributes;
else
- return FALSE;
+ return;
nbkColor = pConInfo->ColorTable[BkgdAttribFromAttrib(CurrentAttrib)];
ntColor = pConInfo->ColorTable[TextAttribFromAttrib(CurrentAttrib)];
hBrush = CreateSolidBrush(nbkColor);
- if (!hBrush) return FALSE;
+ if (!hBrush) return;
hOldFont = SelectObject(drawItem->hDC, hCurrentFont);
//if (hOldFont == NULL)
//{
// DeleteObject(hBrush);
- // return FALSE;
+ // return;
//}
FillRect(drawItem->hDC, &drawItem->rcItem, hBrush);
- ptColor = SetTextColor(drawItem->hDC, ntColor);
+ /* Add a few space between the preview window border and the text sample */
+ InflateRect(&drawItem->rcItem, -2, -2);
+
+ ptColor = SetTextColor(drawItem->hDC, ntColor);
pbkColor = SetBkColor(drawItem->hDC, nbkColor);
- DrawTextW(drawItem->hDC, szPreviewText, wcslen(szPreviewText),
&drawItem->rcItem, 0);
+ DrawTextW(drawItem->hDC, szPreviewText, (INT)wcslen(szPreviewText),
&drawItem->rcItem, 0);
SetTextColor(drawItem->hDC, ptColor);
SetBkColor(drawItem->hDC, pbkColor);
SelectObject(drawItem->hDC, hOldFont);
-
DeleteObject(hBrush);
-
- return TRUE;
}
+
+
+/* LAYOUT DIALOG **************************************************************/
INT_PTR
CALLBACK
@@ -196,10 +568,12 @@
return TRUE;
}
- case WM_DRAWITEM:
- {
- PaintConsole((LPDRAWITEMSTRUCT)lParam, ConInfo);
- return TRUE;
+ case WM_DISPLAYCHANGE:
+ {
+ /* Retransmit to the preview window */
+ SendDlgItemMessageW(hDlg, IDC_STATIC_LAYOUT_WINDOW_PREVIEW,
+ WM_DISPLAYCHANGE, wParam, lParam);
+ break;
}
case WM_NOTIFY: