Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

195 lines
8.1 KiB

  1. /* */
  2. /* Notepad application */
  3. /* */
  4. /* Copyright (C) 1984-2001 Microsoft Inc. */
  5. /* */
  6. #include "notepad.h"
  7. #define GRP WS_GROUP
  8. #define TAB WS_TABSTOP
  9. #define TABGRP WS_TABSTOP | WS_GROUP
  10. #define DLGMODAL WS_POPUP | WS_DLGFRAME
  11. /* Version Stamping */
  12. #include "notepad.rcv"
  13. ID_ICON ICON PRELOAD DISCARDABLE notepad.ico
  14. ID_MENUBAR MENU PRELOAD DISCARDABLE
  15. BEGIN
  16. POPUP "&File"
  17. BEGIN
  18. MENUITEM "&New\tCtrl+N", M_NEW
  19. MENUITEM "&Open...\tCtrl+O", M_OPEN
  20. MENUITEM "&Save\tCtrl+S", M_SAVE
  21. MENUITEM "Save &As...", M_SAVEAS
  22. MENUITEM SEPARATOR
  23. MENUITEM "Page Set&up...", M_PAGESETUP
  24. MENUITEM "&Print...\tCtrl+P", M_PRINT
  25. MENUITEM SEPARATOR
  26. MENUITEM "E&xit", M_EXIT
  27. END
  28. POPUP "&Edit"
  29. BEGIN
  30. MENUITEM "&Undo\tCtrl+Z", M_UNDO
  31. MENUITEM SEPARATOR
  32. MENUITEM "Cu&t\tCtrl+X", M_CUT , GRAYED
  33. MENUITEM "&Copy\tCtrl+C", M_COPY, GRAYED
  34. MENUITEM "&Paste\tCtrl+V", M_PASTE, GRAYED
  35. MENUITEM "De&lete\tDel", M_CLEAR, GRAYED
  36. MENUITEM SEPARATOR
  37. MENUITEM "&Find...\tCtrl+F", M_FIND
  38. MENUITEM "Find &Next\tF3", M_FINDNEXT
  39. MENUITEM "&Replace...\tCtrl+H", M_REPLACE
  40. /*
  41. The hotkey used for replace is CTRL-H in most of the editors, and hence though
  42. this key may conflict with backspace key in IMEs, this key is used here to be compatible
  43. with all the editors. Please contact ChrisW/RajeshM for more details.
  44. */
  45. MENUITEM "&Go To...\tCtrl+G", M_GOTO
  46. MENUITEM SEPARATOR
  47. MENUITEM "Select &All\tCtrl+A", M_SELECTALL
  48. MENUITEM "Time/&Date\tF5", M_DATETIME
  49. END
  50. POPUP "F&ormat"
  51. BEGIN
  52. MENUITEM "&Word Wrap" M_WW
  53. MENUITEM "&Font...", M_SETFONT
  54. END
  55. POPUP "&View"
  56. BEGIN
  57. MENUITEM "&Status Bar", M_STATUSBAR
  58. END
  59. POPUP "&Help"
  60. BEGIN
  61. MENUITEM "&Help Topics", M_HELP
  62. MENUITEM SEPARATOR
  63. MENUITEM "&About Notepad",M_ABOUT
  64. END
  65. END
  66. MainAcc ACCELERATORS PRELOAD DISCARDABLE
  67. BEGIN
  68. "N", M_NEW, VIRTKEY, CONTROL
  69. "O", M_OPEN, VIRTKEY, CONTROL
  70. "S", M_SAVE, VIRTKEY, CONTROL
  71. "P", M_PRINT, VIRTKEY, CONTROL
  72. VK_INSERT, M_COPY, VIRTKEY, CONTROL
  73. VK_F1, M_HELP, VIRTKEY
  74. VK_F3, M_FINDNEXT, VIRTKEY
  75. VK_F5, M_DATETIME, VIRTKEY
  76. "G", M_GOTO, VIRTKEY, CONTROL
  77. "F", M_FIND , VIRTKEY, CONTROL, NOINVERT
  78. "H", M_REPLACE, VIRTKEY, CONTROL, NOINVERT
  79. VK_BACK, M_UNDO, VIRTKEY, ALT
  80. "Z", M_UNDO, VIRTKEY, CONTROL
  81. "X", M_CUT, VIRTKEY, CONTROL
  82. "C", M_COPY, VIRTKEY, CONTROL
  83. "V", M_PASTE, VIRTKEY, CONTROL
  84. "A", M_SELECTALL,VIRTKEY, CONTROL
  85. END
  86. /* Allow exit using ^C, ^D or ^Z during Setup */
  87. SlipUpAcc ACCELERATORS PRELOAD DISCARDABLE
  88. BEGIN
  89. "N", M_NEW, VIRTKEY, CONTROL
  90. "O", M_OPEN, VIRTKEY, CONTROL
  91. "S", M_SAVE, VIRTKEY, CONTROL
  92. "P", M_PRINT, VIRTKEY, CONTROL
  93. VK_INSERT, M_COPY, VIRTKEY, CONTROL
  94. VK_F1, M_HELP, VIRTKEY
  95. VK_F3, M_FINDNEXT, VIRTKEY
  96. VK_F5, M_DATETIME, VIRTKEY
  97. "G", M_GOTO, VIRTKEY, CONTROL
  98. "F", M_FIND, VIRTKEY, CONTROL, NOINVERT
  99. "H", M_REPLACE, VIRTKEY, CONTROL, NOINVERT
  100. VK_BACK, M_UNDO, VIRTKEY, ALT
  101. "Z", M_UNDO, VIRTKEY, CONTROL
  102. "X", M_CUT, VIRTKEY, CONTROL
  103. "C", M_COPY, VIRTKEY, CONTROL
  104. "V", M_PASTE, VIRTKEY, CONTROL
  105. "A", M_SELECTALL,VIRTKEY, CONTROL
  106. VK_ESCAPE, M_EXIT, VIRTKEY
  107. 0x43, M_EXIT, VIRTKEY, CONTROL
  108. 0x44, M_EXIT, VIRTKEY, CONTROL
  109. 0x5A, M_EXIT, VIRTKEY, CONTROL
  110. END
  111. STRINGTABLE PRELOAD DISCARDABLE
  112. BEGIN
  113. IDS_MERGE1 "%%"
  114. IDS_DISKERROR "Cannot open the %% file.\n\nMake sure a disk is in the drive you specified."
  115. IDS_FNF "Cannot find the %% file.\n\nDo you want to create a new file?"
  116. IDS_SCBC "The text in the %% file has changed.\n\nDo you want to save the changes?"
  117. IDS_UNTITLED "Untitled"
  118. IDS_NOTEPAD " - Notepad"
  119. IDS_CFS "Cannot find ""%%"""
  120. /* The following is a generic out of memory message which can also be
  121. system modal so no /n can appear in it. */
  122. IDS_ERRSPACE "Not enough memory available to complete this operation. Quit one or more applications to increase available memory, and then try again."
  123. IDS_FTL "The %% file is too large for Notepad.\n\nUse another editor to edit the file."
  124. IDS_NN "Notepad"
  125. IDS_COMMDLGINIT "Failed to Initialize File Dialogs. Change the Filename and try again."
  126. IDS_PRINTDLGINIT "Failed to Initialize Print Dialogs. Make sure that your printer is connected properly and use Control Panel to verify that the printer is configured properly."
  127. IDS_CANTPRINT "Cannot print the %% file. Be sure that your printer is connected properly and use Control Panel to verify that the printer is configured properly."
  128. IDS_NVF "Not a valid file name."
  129. IDS_CREATEERR "Cannot create the %% file.\n\nMake sure that the path and filename are correct."
  130. IDS_NOWW "Cannot carry out the Word Wrap command because there is too much text in the file."
  131. IDS_HELPFILE "notepad.hlp"
  132. IDS_HEADER "&f"
  133. IDS_FOOTER "Page &p"
  134. IDS_ACCESSDENY "%%\nYou do not have permission to open this file. See the owner of the file or an administrator to obtain permission."
  135. IDS_ANSITEXT "Text Documents (*.txt)" /* filter text for File/Open */
  136. IDS_ALLFILES "All Files " /* filter text for File/Open */
  137. IDS_OPENCAPTION "Open" /* title for file/open dialog */
  138. IDS_SAVECAPTION "Save As" /* title for file/save dialog */
  139. IDS_CANNOTQUIT "You cannot quit Windows because the Save As dialog\nbox in Notepad is open. Switch to Notepad, close this\ndialog box, and then try quitting Windows again."
  140. IDS_LOADDRVFAIL "Cannot access your printer.\nBe sure that your printer is connected properly and use Control Panel to verify that the printer is configured properly."
  141. IDS_ERRUNICODE "%%\n This file contains characters in Unicode format which will be lost if you save this file as an ANSI encoded text file. To keep the Unicode information, click Cancel below and then select one of the Unicode options from the Encoding drop down list. Continue?"
  142. IDS_FONTTOOBIG "Page too small to print one line.\nTry printing using smaller font."
  143. IDS_COMMDLGERR "Common Dialog error (0x%04x)"
  144. IDS_LINEERROR "Notepad - Goto Line"
  145. IDS_LINETOOLARGE "Line number out of range"
  146. IDS_FT_ANSI "ANSI"
  147. IDS_FT_UNICODE "Unicode"
  148. IDS_FT_UNICODEBE "Unicode big endian"
  149. IDS_FT_UTF8 "UTF-8"
  150. IDS_CURRENT_PAGE "Page %d" /* don't change %d; used for printf formatting */
  151. IDS_LINECOL " Ln %d, Col %d "
  152. IDS_COMPRESSED_FILE " Compressed,"
  153. IDS_ENCRYPTED_FILE " Encrypted,"
  154. IDS_HIDDEN_FILE " Hidden,"
  155. IDS_OFFLINE_FILE " Offline,"
  156. IDS_READONLY_FILE " ReadOnly,"
  157. IDS_SYSTEM_FILE " System,"
  158. IDS_FILE " File"
  159. /* Use by MUI, not notepad. See hivecls.inx for reference */
  160. IDS_TEXT_FRIENDLY_NAME "Text Document"
  161. /* IDS_LETTERS "fFpPtTdDcCrRlL" Original US values. This does get translated! */
  162. /* The order is: File, Page, Time, Date, Center, Right, Left */
  163. IDS_LETTERS "fFpPtTdDcCrRlL"
  164. END
  165. /* Include other dialogs. */
  166. rcinclude notepad.dlg
  167. #include <ntverp.h>
  168. #include "common.ver"