notepad resource changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch contains all (I hope its all anyway) of the notepad resource file changes I am making for the improvements I am working on.

I am mainly posting this so that I can get these things translated into other languages.
changes:
1.make accellerators use VIRTKEY, CONTROL instead of ^ (fixes something to do with ^H being equal to backspace)
2.add F1 for help contents
3.add Ctrl-P for Print
4.add Ctrl-N for New
5.add Ctrl-H for Replace
6.add Ctrl-G for Goto
7.only include wa.rc and fr.rc if __WINE__ is defined (for some reason the windows compilers I am using to do some of the development and testing dont like either of those 2 files)
8.add dialog #defines in notepad_res.h for the "goto line" dialog, the "Text encoding" thingo for the open dialog and the "now printing" dialog
9.add #defines for the "status bar", "replace" and "goto" menu options
10.add #defines for the new strings
11.modify the New menu item to remove the ... and add Ctrl-N
12.modify the Open menu item to add the ...
13.make the a in Save As a capital letter
14.remove the Printer Setup menu item (since I am going to implement a Notepad XP-alike combined page-setup and print-setup dialog
15.move the Page Setup menu item so its above Print and make it use the t for the hotkey not the u
16.add Ctrl-P and ... to Print
17.make Cut, Copy, Paste and Delete start out greyed (the code to turn them on and off as appropriate is being worked on)
18.Add a seperator after Delete
19.move Search and Search Next from the Search menu, delete the Search menu and rename the items to Find and Find Next. Also add the ... to Find
20.Add Replace and Goto to Edit
21.Move Wrap Long Lines to a new Format menu and call it Word Wrap
22.Move Font to Format
23.change Time/Date to use D for hotkey instead of T
24.make the A in Select All captial
25.Add a View menu with a Status Bar item
26.remove Help On Help and Search and rename Contents to Help Topics
27.Add a "Now Printing" dialog
28.Create a template for the new Page Setup dialog
29.Add a "Goto Line" dialog
30.Add a thingo for the "Text Encoding" for the file-open dialog
31.change STRING_PAGESETUP_HEADERVALUE from &n to &f
32.change STRING_PAGESETUP_FOOTERVALUE from &s to &p
33.remove the (*.*) bit from STRING_ALL_FILES
34.change STRING_TEXT_FILES_TXT from Files to Documents
35.add a new string "Cannot print '%s'. Check that your printer is correctly connected and configured."
36.add a new string "'%s' contains unicode characters which will be lost if you save in ANSI text. Do you wish to save in ANSI anyway?"
37.add a new string "Line number out of range."
38.add a new string "Page %d"
39.add strings "ANSI", "Unicode", "Unicode Big Endian" & "UTF-8"
and 40.add a new string " Ln %d, Col %d "


All these resources will be used later when I get code written for them (for example, point 40 is for the status bar code)

Nothing here is in any way (c) microsoft (or derived from something thats (c) microsoft)
I have not used IDA pro or anything else to look inside notepad.exe, its all based on comparing notepad from winxp to notepad from wine, reading microsoft examples and code (like MFC source), no code is directly taken from said examples or code though, and from reading stuff in some of the books I have.
--- rsrc.rc	2003-08-01 12:48:18.000000000 +0800
+++ notepad\rsrc.rc	2003-07-29 15:54:26.000000000 +0800
@@ -26,14 +26,19 @@
 
 ID_ACCEL ACCELERATORS
 {
-    "^A", CMD_SELECT_ALL
-    "^C", CMD_COPY
-    "^F", CMD_SEARCH
-    "^O", CMD_OPEN
-    "^S", CMD_SAVE
-    "^V", CMD_PASTE
-    "^X", CMD_CUT
-    "^Z", CMD_UNDO
+    "A", CMD_SELECT_ALL, VIRTKEY, CONTROL
+    "C", CMD_COPY, VIRTKEY, CONTROL
+    "F", CMD_SEARCH, VIRTKEY, CONTROL
+    "G", CMD_GOTO, VIRTKEY, CONTROL
+    "H", CMD_REPLACE, VIRTKEY, CONTROL
+    "N", CMD_NEW, VIRTKEY, CONTROL
+    "O", CMD_OPEN, VIRTKEY, CONTROL
+    "P", CMD_PRINT, VIRTKEY, CONTROL
+    "S", CMD_SAVE, VIRTKEY, CONTROL
+    "V", CMD_PASTE, VIRTKEY, CONTROL
+    "X", CMD_CUT, VIRTKEY, CONTROL
+    "Z", CMD_UNDO, VIRTKEY, CONTROL
+    VK_F1, CMD_HELP_CONTENTS, VIRTKEY
     VK_F3, CMD_SEARCH_NEXT, VIRTKEY
     VK_F5, CMD_TIME_DATE, VIRTKEY
 }
@@ -43,12 +48,16 @@
 #include "En.rc"
 #include "Es.rc"
 #include "Fi.rc"
+#ifdef __WINE__
 #include "Fr.rc"
+#endif
 #include "Hu.rc"
 #include "Pt.rc"
 #include "Ru.rc"
 #include "Si.rc"
 #include "Sk.rc"
 #include "Sw.rc"
+#ifdef __WINE__
 #include "Wa.rc"
+#endif
 #include "Zh.rc"
--- notepad_res.h	2003-08-01 12:47:34.000000000 +0800
+++ notepad\notepad_res.h	2003-08-01 12:49:36.000000000 +0800
@@ -21,6 +21,9 @@
 
 #define MAIN_MENU               0x201
 #define DIALOG_PAGESETUP        0x202
+#define DIALOG_GOTO             0x204
+#define DIALOG_ENCODING         0x205
+#define DIALOG_PRINTING         0x206
 #define ID_ACCEL                0x203
 
 /* Commands */
@@ -47,6 +50,10 @@
 #define CMD_WRAP                0x119
 #define CMD_FONT                0x140
 
+#define CMD_STATUS                             0x122
+#define CMD_REPLACE             0x123
+#define CMD_GOTO                0x124
+
 #define CMD_HELP_CONTENTS       0x130
 #define CMD_HELP_SEARCH         0x131
 #define CMD_HELP_ON_HELP        0x132
@@ -76,3 +83,12 @@
 
 #define STRING_NOTFOUND 0x17B
 #define STRING_OUT_OF_MEMORY 0x17C
+#define STRING_PRINTERROR 0x17D
+#define STRING_UNICODEERROR 0x17E
+#define STRING_OUTOFRANGE 0x17F
+#define STRING_PAGE 0x180
+#define STRING_ANSI 0x181
+#define STRING_UNICODE 0x182
+#define STRING_BIGENDIAN 0x183
+#define STRING_UTF8 0x184
+#define STRING_STATUS 0x185
--- En.rc	2003-08-01 12:48:08.000000000 +0800
+++ notepad\En.rc	2003-08-01 12:50:06.000000000 +0800
@@ -26,39 +26,41 @@
 MAIN_MENU MENU
 {
  POPUP "&File" {
-  MENUITEM "&New...",           CMD_NEW
-  MENUITEM "&Open\tCtrl+O",     CMD_OPEN
+  MENUITEM "&New\tCtrl+N",      CMD_NEW
+  MENUITEM "&Open...\tCtrl+O",     CMD_OPEN
   MENUITEM "&Save\tCtrl+S",     CMD_SAVE
-  MENUITEM "Save &as...",       CMD_SAVE_AS
+  MENUITEM "Save &As...",       CMD_SAVE_AS
   MENUITEM SEPARATOR
-  MENUITEM "&Print",            CMD_PRINT
-  MENUITEM "Page Se&tup...",    CMD_PAGE_SETUP
-  MENUITEM "P&rinter Setup...", CMD_PRINTER_SETUP
+  MENUITEM "Page Set&up...",    CMD_PAGE_SETUP
+  MENUITEM "&Print...\tCtrl+P", CMD_PRINT
   MENUITEM SEPARATOR
   MENUITEM "E&xit",             CMD_EXIT
  }
 POPUP "&Edit" {
   MENUITEM "&Undo\tCtrl+Z",     CMD_UNDO
   MENUITEM SEPARATOR
-  MENUITEM "Cu&t\tCtrl+X",      CMD_CUT
-  MENUITEM "&Copy\tCtrl+C",     CMD_COPY
-  MENUITEM "&Paste\tCtrl+V",    CMD_PASTE
-  MENUITEM "&Delete\tDel",      CMD_DELETE
+  MENUITEM "Cu&t\tCtrl+X",      CMD_CUT, GRAYED
+  MENUITEM "&Copy\tCtrl+C",     CMD_COPY, GRAYED
+  MENUITEM "&Paste\tCtrl+V",    CMD_PASTE, GRAYED
+  MENUITEM "&Delete\tDel",      CMD_DELETE, GRAYED
+  MENUITEM SEPARATOR
+  MENUITEM "&Find...\tCtrl+F",  CMD_SEARCH
+  MENUITEM "Find &Next\tF3",    CMD_SEARCH_NEXT
+  MENUITEM "&Replace...\tCtrl+H",CMD_REPLACE
+  MENUITEM "&Go To...\tCtrl+G", CMD_GOTO
   MENUITEM SEPARATOR
-  MENUITEM "Select &all\tCtrl+A",       CMD_SELECT_ALL
-  MENUITEM "&Time/Date\tF5",    CMD_TIME_DATE
-  MENUITEM SEPARATOR
-  MENUITEM "&Wrap long lines",  CMD_WRAP
+  MENUITEM "Select &All\tCtrl+A",       CMD_SELECT_ALL
+  MENUITEM "Time/&Date\tF5",    CMD_TIME_DATE
+ }
+POPUP "F&ormat" {
+  MENUITEM "&Word Wrap",        CMD_WRAP
   MENUITEM "&Font...",          CMD_FONT
  }
-POPUP "&Search" {
-  MENUITEM "&Search\tCtrl+F",   CMD_SEARCH
-  MENUITEM "&Search next\tF3",  CMD_SEARCH_NEXT
+POPUP "&View" {
+  MENUITEM "&Status Bar",       CMD_STATUS
  }
 POPUP "&Help" {
-  MENUITEM "&Contents",         CMD_HELP_CONTENTS
-  MENUITEM "&Search...",        CMD_HELP_SEARCH
-  MENUITEM "&Help on help",     CMD_HELP_ON_HELP
+  MENUITEM "&Help Topics",         CMD_HELP_CONTENTS
   MENUITEM SEPARATOR
   POPUP "Inf&o..." {
    MENUITEM "&License",         CMD_LICENSE
@@ -68,37 +70,88 @@
  }
 }
 
-/* Dialog `Page setup' */
+/* Dialog `Now Printing' */
 
-DIALOG_PAGESETUP DIALOG 0, 0, 225, 95
+DIALOG_PRINTING DIALOG 20, 20, 200, 64
 STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
 FONT 8, "Helv"
+CAPTION "Notepad"
+{
+DEFPUSHBUTTON "Cancel",2,84,44,32,14,WS_GROUP
+CTEXT "Now Printing",-1,0,8,200,8
+CTEXT "",20,0,18,200,8,SS_PATHELLIPSIS
+CTEXT "",21,0,28,200,8
+}
+
+/* Dialog `Page setup' */
+
+DIALOG_PAGESETUP DIALOG DISCARDABLE  0, 0, 356, 196
+STYLE DS_MODALFRAME | DS_3DLOOK | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | 
+    WS_CAPTION | WS_SYSMENU
 CAPTION "Page Setup"
+FONT 8, "Helv"
 {
-LTEXT    "&Header:",  0x140,   10, 07, 40, 15
-EDITTEXT                         0x141,       60, 05,110, 12, WS_BORDER | WS_TABSTOP
-LTEXT    "&Footer:",  0x142,   10, 24, 40, 15
-EDITTEXT                         0x143,       60, 22,110, 12, WS_BORDER | WS_TABSTOP
-
-GROUPBOX "&Margins:",      0x144,     10, 43,160, 45
-LTEXT    "&Left:",        0x145,   20, 55, 30, 10, WS_CHILD
-EDITTEXT /*STRING_PAGESETUP_LEFTVALUE,*/   0x147,       50, 55, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP
-LTEXT    "&Top:",         0x148,    20, 73, 30, 10, WS_CHILD
-EDITTEXT /*STRING_PAGESETUP_TOPVALUE,*/    0x14A,        50, 73, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP
-LTEXT    "&Right:",       0x14B, 100, 55, 30, 10, WS_CHILD
-EDITTEXT /*STRING_PAGESETUP_RIGHTVALUE,*/  0x14D,     130, 55, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP
-LTEXT    "&Bottom:",      0x14E,100, 73, 30, 10, WS_CHILD
-EDITTEXT /*STRING_PAGESETUP_BOTTOMVALUE,*/ 0x150,    130, 73, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP
-
-DEFPUSHBUTTON "OK",         0x151,                   180,  3, 40, 15, WS_TABSTOP
-PUSHBUTTON    "Cancel",     0x152,               180, 21, 40, 15, WS_TABSTOP
-PUSHBUTTON    "&Help",       0x153,                180, 39, 40, 15, WS_TABSTOP
+GROUPBOX        "Paper",1073,8,8,224,56,WS_GROUP
+LTEXT           "Si&ze:",1089,16,24,36,8
+COMBOBOX        1137,64,23,160,160,CBS_DROPDOWNLIST | CBS_SORT | 
+                WS_VSCROLL | WS_GROUP | WS_TABSTOP
+LTEXT           "&Source:",1090,16,45,36,8
+COMBOBOX        1138,64,42,160,160,CBS_DROPDOWNLIST | CBS_SORT | 
+                WS_VSCROLL | WS_GROUP | WS_TABSTOP
+GROUPBOX        "Orientation",1072,8,69,64,56,WS_GROUP
+CONTROL         "P&ortrait",1056,"Button",BS_AUTORADIOBUTTON | WS_GROUP | 
+                WS_TABSTOP,16,82,52,12
+CONTROL         "L&andscape",1057,"Button",BS_AUTORADIOBUTTON,16,103,52,
+                12
+GROUPBOX        "Margins",1075,80,69,152,56,WS_GROUP
+LTEXT           "&Left:",1102,88,85,32,8
+EDITTEXT        1155,120,82,28,12,WS_GROUP
+LTEXT           "&Right:",1103,164,85,32,8
+EDITTEXT        1157,196,82,28,12,WS_GROUP
+LTEXT           "&Top:",1104,88,104,32,8
+EDITTEXT        1156,120,103,28,12,WS_GROUP
+LTEXT           "&Bottom:",1105,164,104,32,8
+EDITTEXT        1158,196,103,28,12,WS_GROUP
+LTEXT           "&Header:",32,8,135,29,8
+EDITTEXT        30,56,134,174,12,ES_AUTOHSCROLL
+LTEXT           "&Footer:",33,8,154,29,8
+EDITTEXT        31,56,153,174,12,ES_AUTOHSCROLL
+DEFPUSHBUTTON   "OK",IDOK,190,174,50,14,WS_GROUP
+PUSHBUTTON      "Cancel",IDCANCEL,244,174,50,14
+PUSHBUTTON      "&Printer...",1026,298,174,50,14
+GROUPBOX        "Preview",-1,240,8,108,158
+CONTROL         "",1080,"Static",SS_WHITERECT,254,46,80,80
+CONTROL         "",1081,"Static",SS_GRAYRECT,334,50,4,80
+CONTROL         "",1082,"Static",SS_GRAYRECT,262,122,80,4
 }
 
+/* Dialog `Goto Line' */
+
+DIALOG_GOTO DIALOG 0, 0, 180, 57
+STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+FONT 8, "Helv"
+CAPTION "Goto line"
+{
+LTEXT "&Line Number:",1200,7,9,50,10, WS_TABSTOP
+EDITTEXT 258,55,7,57,12, WS_TABSTOP
+DEFPUSHBUTTON "OK",IDOK,7,34,50,14, WS_TABSTOP
+PUSHBUTTON "Cancel",IDCANCEL,78,34,50,14, WS_TABSTOP
+}
+
+/* Dialog `Text Encoding' */
+DIALOG_ENCODING DIALOG 30, 17, 300, 22
+STYLE DS_CONTROL | DS_CONTEXTHELP | WS_CHILD | WS_CLIPSIBLINGS
+FONT 8, "Helv"
+{
+LTEXT "&Encoding:",259,68,1,40,40,NOT WS_GROUP
+COMBOBOX 257,130,0,164,100,CBS_DROPDOWNLIST | WS_VSCROLL | WS_GROUP | WS_TABSTOP
+}
+
+
 STRINGTABLE DISCARDABLE
 {
-STRING_PAGESETUP_HEADERVALUE,   "&n"        /* FIXME */
-STRING_PAGESETUP_FOOTERVALUE,   "Page &s"   /* FIXME */
+STRING_PAGESETUP_HEADERVALUE,   "&f"        /* FIXME */
+STRING_PAGESETUP_FOOTERVALUE,   "Page &p"   /* FIXME */
 STRING_PAGESETUP_LEFTVALUE,             "20 mm"     /* FIXME */
 STRING_PAGESETUP_RIGHTVALUE,    "20 mm"     /* FIXME */
 STRING_PAGESETUP_TOPVALUE,              "25 mm"     /* FIXME */
@@ -111,8 +164,8 @@
 
 STRING_UNTITLED,                                "(untitled)"
 
-STRING_ALL_FILES,                               "All files (*.*)"
-STRING_TEXT_FILES_TXT,                  "Text files (*.txt)"
+STRING_ALL_FILES,                               "All files"
+STRING_TEXT_FILES_TXT,                  "Text Documents (*.txt)"
 
 STRING_TOOLARGE,                                "File '%s' is too large for notepad.\n \
 Please use a different editor."
@@ -126,5 +179,13 @@
 STRING_OUT_OF_MEMORY,                   "Not enough memory to complete this \
 task. \nClose one or more applications to increase the amount of \nfree \
 memory."
-
+STRING_PRINTERROR,                      "Cannot print '%s'. Check that your printer is correctly connected and configured."
+STRING_UNICODEERROR,                         "'%s' contains unicode characters which will be lost if you save in ANSI text. Do you wish to save in ANSI anyway?"
+STRING_OUTOFRANGE,                      "Line number out of range."
+STRING_PAGE, "Page %d"
+STRING_ANSI, "ANSI"
+STRING_UNICODE, "Unicode"
+STRING_BIGENDIAN, "Unicode Big Endian"
+STRING_UTF8, "UTF-8"
+STRING_STATUS, "   Ln %d, Col %d  "
 }

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux