Author: cfinck
Date: Mon Nov 3 15:23:57 2008
New Revision: 37176
URL:
http://svn.reactos.org/svn/reactos?rev=37176&view=rev
Log:
Carlo Bramini (carlo.bramix(a)libero.it)
- Fix the display of Line and Column in the Status Bar and add language resources for
this
Patch was slightly modified by me to also react on WM_KEYDOWN messages, so that the
line/column is already updated, when you're holding down the buttons. (like
Windows' notepad does by the way)
We still have to keep WM_KEYUP though, otherwise this doesn't work properly when being
used with Page Up/Page Down.
See issue #3702 for more details.
Modified:
trunk/reactos/base/applications/notepad/dialog.c
trunk/reactos/base/applications/notepad/lang/bg-BG.rc
trunk/reactos/base/applications/notepad/lang/cs-CZ.rc
trunk/reactos/base/applications/notepad/lang/da-DK.rc
trunk/reactos/base/applications/notepad/lang/de-DE.rc
trunk/reactos/base/applications/notepad/lang/el-GR.rc
trunk/reactos/base/applications/notepad/lang/en-US.rc
trunk/reactos/base/applications/notepad/lang/es-ES.rc
trunk/reactos/base/applications/notepad/lang/eu-ES.rc
trunk/reactos/base/applications/notepad/lang/fi-FI.rc
trunk/reactos/base/applications/notepad/lang/fr-FR.rc
trunk/reactos/base/applications/notepad/lang/hu-HU.rc
trunk/reactos/base/applications/notepad/lang/id-ID.rc
trunk/reactos/base/applications/notepad/lang/it-IT.rc
trunk/reactos/base/applications/notepad/lang/ja-JP.rc
trunk/reactos/base/applications/notepad/lang/lt-LT.rc
trunk/reactos/base/applications/notepad/lang/nl-NL.rc
trunk/reactos/base/applications/notepad/lang/no-NO.rc
trunk/reactos/base/applications/notepad/lang/pl-PL.rc
trunk/reactos/base/applications/notepad/lang/pt-PT.rc
trunk/reactos/base/applications/notepad/lang/ru-RU.rc
trunk/reactos/base/applications/notepad/lang/sk-SK.rc
trunk/reactos/base/applications/notepad/lang/sl-SI.rc
trunk/reactos/base/applications/notepad/lang/sv-SE.rc
trunk/reactos/base/applications/notepad/lang/th-TH.rc
trunk/reactos/base/applications/notepad/lang/uk-UA.rc
trunk/reactos/base/applications/notepad/lang/zh-CN.rc
trunk/reactos/base/applications/notepad/main.c
trunk/reactos/base/applications/notepad/main.h
trunk/reactos/base/applications/notepad/notepad_res.h
trunk/reactos/base/applications/notepad/settings.c
Modified: trunk/reactos/base/applications/notepad/dialog.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/dialog.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/dialog.c [iso-8859-1] Mon Nov 3 15:23:57
2008
@@ -871,19 +871,15 @@
VOID DIALOG_StatusBarUpdateCaretPos(VOID)
{
- int line;
- int col;
- int ccol;
- POINT point;
+ int line, col;
TCHAR buff[MAX_PATH];
-
- GetCaretPos(&point);
- line = (int) SendMessage(Globals.hEdit, EM_LINEFROMCHAR, (WPARAM)-1, (LPARAM)0);
- ccol = (int) SendMessage(Globals.hEdit, EM_CHARFROMPOS, (WPARAM)0,
(LPARAM)MAKELPARAM(point.x, point.y));
- ccol = LOWORD(ccol);
- col = ccol - (int) SendMessage(Globals.hEdit, EM_LINEINDEX, (WPARAM)line,
(LPARAM)0);
-
- _stprintf(buff, TEXT("%S %d, %S %d"), Globals.szStatusBarLine, line+1,
Globals.szStatusBarCol, col+1);
+ DWORD dwStart, dwSize;
+
+ SendMessage(Globals.hEdit, EM_GETSEL, (WPARAM)&dwStart, (LPARAM)&dwSize);
+ line = SendMessage(Globals.hEdit, EM_LINEFROMCHAR, (WPARAM)dwStart, 0);
+ col = dwStart - SendMessage(Globals.hEdit, EM_LINEINDEX, (WPARAM)line, 0);
+
+ _stprintf(buff, Globals.szStatusBarLineCol, line+1, col+1);
SendMessage(Globals.hStatusBar, SB_SETTEXT, (WPARAM) SB_SIMPLEID, (LPARAM)buff);
}
@@ -896,8 +892,7 @@
if ( !Globals.hStatusBar )
{
Globals.hStatusBar = CreateStatusWindow(WS_CHILD | WS_VISIBLE | WS_EX_STATICEDGE,
TEXT("test"), Globals.hMainWnd, CMD_STATUSBAR_WND_ID );
- LoadString(Globals.hInstance, STRING_LINE, Globals.szStatusBarLine, MAX_PATH-1);
- LoadString(Globals.hInstance, STRING_COLUMN, Globals.szStatusBarCol, MAX_PATH-1);
+ LoadString(Globals.hInstance, STRING_LINE_COLUMN, Globals.szStatusBarLineCol,
MAX_PATH-1);
SendMessage(Globals.hStatusBar, SB_SIMPLE, (WPARAM)TRUE, (LPARAM)0);
}
CheckMenuItem(GetMenu(Globals.hMainWnd), CMD_STATUSBAR,
Modified: trunk/reactos/base/applications/notepad/lang/bg-BG.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/bg-BG.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/bg-BG.rc [iso-8859-1] Mon Nov 3 15:23:57
2008
@@ -201,4 +201,5 @@
STRING_CRLF, "Óüèíäîóüñ"
STRING_LF, "Þíèêñ"
STRING_CR, "Ìàê"
-END
+STRING_LINE_COLUMN, "Line %d, column %d"
+END
Modified: trunk/reactos/base/applications/notepad/lang/cs-CZ.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/cs-CZ.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/cs-CZ.rc [iso-8859-1] Mon Nov 3 15:23:57
2008
@@ -203,4 +203,5 @@
STRING_CRLF, "Windows"
STRING_LF, "Unix"
STRING_CR, "Mac"
-END
+STRING_LINE_COLUMN, "Line %d, column %d"
+END
Modified: trunk/reactos/base/applications/notepad/lang/da-DK.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/da-DK.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/da-DK.rc [iso-8859-1] Mon Nov 3 15:23:57
2008
@@ -200,4 +200,5 @@
STRING_CRLF, "Windows"
STRING_LF, "Unix"
STRING_CR, "Mac"
-END
+STRING_LINE_COLUMN, "Line %d, column %d"
+END
Modified: trunk/reactos/base/applications/notepad/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/de-DE.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/de-DE.rc [iso-8859-1] Mon Nov 3 15:23:57
2008
@@ -202,4 +202,5 @@
STRING_CRLF, "Windows"
STRING_LF, "Unix"
STRING_CR, "Mac"
-END
+STRING_LINE_COLUMN, "Zeile %d, Spalte %d"
+END
Modified: trunk/reactos/base/applications/notepad/lang/el-GR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/el-GR.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/el-GR.rc [iso-8859-1] Mon Nov 3 15:23:57
2008
@@ -199,4 +199,5 @@
STRING_CRLF, "Windows"
STRING_LF, "Unix"
STRING_CR, "Mac"
-END
+STRING_LINE_COLUMN, "Line %d, column %d"
+END
Modified: trunk/reactos/base/applications/notepad/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/en-US.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/en-US.rc [iso-8859-1] Mon Nov 3 15:23:57
2008
@@ -201,4 +201,5 @@
STRING_CRLF, "Windows"
STRING_LF, "Unix"
STRING_CR, "Mac"
-END
+STRING_LINE_COLUMN, "Line %d, column %d"
+END
Modified: trunk/reactos/base/applications/notepad/lang/es-ES.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/es-ES.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/es-ES.rc [iso-8859-1] Mon Nov 3 15:23:57
2008
@@ -203,5 +203,6 @@
STRING_CRLF, "Windows"
STRING_LF, "Unix"
STRING_CR, "Mac"
-
-END
+STRING_LINE_COLUMN, "Line %d, column %d"
+
+END
Modified: trunk/reactos/base/applications/notepad/lang/eu-ES.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/eu-ES.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/eu-ES.rc [iso-8859-1] Mon Nov 3 15:23:57
2008
@@ -179,5 +179,5 @@
STRING_CRLF, "Windows"
STRING_LF, "Unix"
STRING_CR, "Mac"
-
+STRING_LINE_COLUMN, "Line %d, column %d"
END
Modified: trunk/reactos/base/applications/notepad/lang/fi-FI.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/fi-FI.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/fi-FI.rc [iso-8859-1] Mon Nov 3 15:23:57
2008
@@ -200,4 +200,5 @@
STRING_CRLF, "Windows"
STRING_LF, "Unix"
STRING_CR, "Mac"
-END
+STRING_LINE_COLUMN, "Line %d, column %d"
+END
Modified: trunk/reactos/base/applications/notepad/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/fr-FR.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/fr-FR.rc [iso-8859-1] Mon Nov 3 15:23:57
2008
@@ -201,4 +201,5 @@
STRING_CRLF, "Windows"
STRING_LF, "Unix"
STRING_CR, "Mac"
-END
+STRING_LINE_COLUMN, "Ligne %d, colonne %d"
+END
Modified: trunk/reactos/base/applications/notepad/lang/hu-HU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/hu-HU.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/hu-HU.rc [iso-8859-1] Mon Nov 3 15:23:57
2008
@@ -202,4 +202,5 @@
STRING_CRLF, "Windows"
STRING_LF, "Unix"
STRING_CR, "Mac"
-END
+STRING_LINE_COLUMN, "Line %d, column %d"
+END
Modified: trunk/reactos/base/applications/notepad/lang/id-ID.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/id-ID.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/id-ID.rc [iso-8859-1] Mon Nov 3 15:23:57
2008
@@ -202,4 +202,5 @@
STRING_CRLF, "Windows"
STRING_LF, "Unix"
STRING_CR, "Mac"
-END
+STRING_LINE_COLUMN, "Line %d, column %d"
+END
Modified: trunk/reactos/base/applications/notepad/lang/it-IT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/it-IT.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/it-IT.rc [iso-8859-1] Mon Nov 3 15:23:57
2008
@@ -204,4 +204,5 @@
STRING_CRLF, "Windows"
STRING_LF, "Unix"
STRING_CR, "Mac"
-END
+STRING_LINE_COLUMN, "Linea %d, colonna %d"
+END
Modified: trunk/reactos/base/applications/notepad/lang/ja-JP.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/ja-JP.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/ja-JP.rc [iso-8859-1] Mon Nov 3 15:23:57
2008
@@ -201,4 +201,5 @@
STRING_CRLF, "Windows (CR+LF)"
STRING_LF, "Unix (LF)"
STRING_CR, "Mac (CR)"
-END
+STRING_LINE_COLUMN, "Line %d, column %d"
+END
Modified: trunk/reactos/base/applications/notepad/lang/lt-LT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/lt-LT.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/lt-LT.rc [iso-8859-1] Mon Nov 3 15:23:57
2008
@@ -202,4 +202,5 @@
STRING_CRLF, "Windows"
STRING_LF, "Unix"
STRING_CR, "Mac"
-END
+STRING_LINE_COLUMN, "Line %d, column %d"
+END
Modified: trunk/reactos/base/applications/notepad/lang/nl-NL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/nl-NL.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/nl-NL.rc [iso-8859-1] Mon Nov 3 15:23:57
2008
@@ -198,4 +198,5 @@
STRING_CRLF, "Windows"
STRING_LF, "Unix"
STRING_CR, "Mac"
-END
+STRING_LINE_COLUMN, "Line %d, column %d"
+END
Modified: trunk/reactos/base/applications/notepad/lang/no-NO.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/no-NO.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/no-NO.rc [iso-8859-1] Mon Nov 3 15:23:57
2008
@@ -201,4 +201,5 @@
STRING_CRLF, "Windows"
STRING_LF, "Unix"
STRING_CR, "Mac"
-END
+STRING_LINE_COLUMN, "Line %d, column %d"
+END
Modified: trunk/reactos/base/applications/notepad/lang/pl-PL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/pl-PL.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/pl-PL.rc [iso-8859-1] Mon Nov 3 15:23:57
2008
@@ -207,4 +207,5 @@
STRING_CRLF, "Windows"
STRING_LF, "Unix"
STRING_CR, "Mac"
-END
+STRING_LINE_COLUMN, "Line %d, column %d"
+END
Modified: trunk/reactos/base/applications/notepad/lang/pt-PT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/pt-PT.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/pt-PT.rc [iso-8859-1] Mon Nov 3 15:23:57
2008
@@ -200,4 +200,5 @@
STRING_CRLF, "Windows"
STRING_LF, "Unix"
STRING_CR, "Mac"
-END
+STRING_LINE_COLUMN, "Line %d, column %d"
+END
Modified: trunk/reactos/base/applications/notepad/lang/ru-RU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/ru-RU.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/ru-RU.rc [iso-8859-1] Mon Nov 3 15:23:57
2008
@@ -200,4 +200,5 @@
STRING_CRLF, "Windows"
STRING_LF, "Unix"
STRING_CR, "Ìàêèíòîø"
-END
+STRING_LINE_COLUMN, "Line %d, column %d"
+END
Modified: trunk/reactos/base/applications/notepad/lang/sk-SK.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/sk-SK.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/sk-SK.rc [iso-8859-1] Mon Nov 3 15:23:57
2008
@@ -189,4 +189,5 @@
STRING_CRLF, "Windows"
STRING_LF, "Unix"
STRING_CR, "Mac"
+STRING_LINE_COLUMN, "Line %d, column %d"
END
Modified: trunk/reactos/base/applications/notepad/lang/sl-SI.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/sl-SI.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/sl-SI.rc [iso-8859-1] Mon Nov 3 15:23:57
2008
@@ -198,4 +198,5 @@
STRING_CRLF, "Windows"
STRING_LF, "Unix"
STRING_CR, "Mac"
-END
+STRING_LINE_COLUMN, "Line %d, column %d"
+END
Modified: trunk/reactos/base/applications/notepad/lang/sv-SE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/sv-SE.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/sv-SE.rc [iso-8859-1] Mon Nov 3 15:23:57
2008
@@ -201,4 +201,5 @@
STRING_CRLF, "Windows"
STRING_LF, "Unix"
STRING_CR, "Mac"
-END
+STRING_LINE_COLUMN, "Line %d, column %d"
+END
Modified: trunk/reactos/base/applications/notepad/lang/th-TH.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/th-TH.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/th-TH.rc [iso-8859-1] Mon Nov 3 15:23:57
2008
@@ -193,4 +193,5 @@
STRING_CRLF, "Windows"
STRING_LF, "Unix"
STRING_CR, "Mac"
+STRING_LINE_COLUMN, "Line %d, column %d"
END
Modified: trunk/reactos/base/applications/notepad/lang/uk-UA.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/uk-UA.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/uk-UA.rc [iso-8859-1] Mon Nov 3 15:23:57
2008
@@ -198,4 +198,5 @@
STRING_CRLF, "Windows"
STRING_LF, "Unix"
STRING_CR, "Mac"
-END
+STRING_LINE_COLUMN, "Line %d, column %d"
+END
Modified: trunk/reactos/base/applications/notepad/lang/zh-CN.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/zh-CN.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/zh-CN.rc [iso-8859-1] Mon Nov 3 15:23:57
2008
@@ -199,4 +199,5 @@
STRING_CRLF, "Windows"
STRING_LF, "Unix"
STRING_CR, "Mac"
-END
+STRING_LINE_COLUMN, "Line %d, column %d"
+END
Modified: trunk/reactos/base/applications/notepad/main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/main.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/main.c [iso-8859-1] Mon Nov 3 15:23:57 2008
@@ -302,6 +302,7 @@
{
switch (msg)
{
+ case WM_KEYDOWN:
case WM_KEYUP:
{
switch (wParam)
Modified: trunk/reactos/base/applications/notepad/main.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/main.h [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/main.h [iso-8859-1] Mon Nov 3 15:23:57 2008
@@ -61,8 +61,7 @@
TCHAR szMarginRight[MAX_PATH];
TCHAR szHeader[MAX_PATH];
TCHAR szFooter[MAX_PATH];
- TCHAR szStatusBarLine[MAX_PATH];
- TCHAR szStatusBarCol[MAX_PATH];
+ TCHAR szStatusBarLineCol[MAX_PATH];
int iEncoding;
int iEoln;
Modified: trunk/reactos/base/applications/notepad/notepad_res.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/notepad_res.h [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/notepad_res.h [iso-8859-1] Mon Nov 3 15:23:57
2008
@@ -101,5 +101,4 @@
#define STRING_CR 0x184
#define STRING_LICENSE 0x185
-#define STRING_LINE 0x186
-#define STRING_COLUMN 0x187
+#define STRING_LINE_COLUMN 0x186
Modified: trunk/reactos/base/applications/notepad/settings.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/settings.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/settings.c [iso-8859-1] Mon Nov 3 15:23:57
2008
@@ -112,7 +112,7 @@
base_length = (GetSystemMetrics(SM_CXSCREEN) > GetSystemMetrics(SM_CYSCREEN))?
GetSystemMetrics(SM_CYSCREEN) : GetSystemMetrics(SM_CXSCREEN);
- dx = base_length * .95;
+ dx = (INT)(base_length * .95);
dy = dx * 3 / 4;
SetRect( &Globals.main_rect, 0, 0, dx, dy );