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.

190 lines
8.1 KiB

  1. /* */
  2. /* Notepad application */
  3. /* */
  4. /* Copyright (C) 1984-2000 Microsoft Corporation */
  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_APPICON ICON PRELOAD DISCARDABLE npapp.ico
  14. ID_ICON ICON PRELOAD DISCARDABLE notepad.ico
  15. ID_MENUBAR MENU PRELOAD DISCARDABLE
  16. BEGIN
  17. POPUP "&File"
  18. BEGIN
  19. MENUITEM "&New\tCtrl+N", M_NEW
  20. MENUITEM "&Open...\tCtrl+O", M_OPEN
  21. MENUITEM "&Save\tCtrl+S", M_SAVE
  22. MENUITEM "Save &As...", M_SAVEAS
  23. MENUITEM SEPARATOR
  24. MENUITEM "Page Set&up...", M_PAGESETUP
  25. MENUITEM "&Print...\tCtrl+P", M_PRINT
  26. MENUITEM SEPARATOR
  27. MENUITEM "E&xit", M_EXIT
  28. END
  29. POPUP "&Edit"
  30. BEGIN
  31. MENUITEM "&Undo\tCtrl+Z", M_UNDO
  32. MENUITEM SEPARATOR
  33. MENUITEM "Cu&t\tCtrl+X", M_CUT , GRAYED
  34. MENUITEM "&Copy\tCtrl+C", M_COPY, GRAYED
  35. MENUITEM "&Paste\tCtrl+V", M_PASTE, GRAYED
  36. MENUITEM "De&lete\tDel", M_CLEAR, GRAYED
  37. MENUITEM SEPARATOR
  38. MENUITEM "&Find...\tCtrl+F", M_FIND
  39. MENUITEM "Find &Next\tF3", M_FINDNEXT
  40. MENUITEM "&Replace...\tCtrl+H", M_REPLACE
  41. /*
  42. The hotkey used for replace is CTRL-H in most of the editors, and hence though
  43. this key may conflict with backspace key in IMEs, this key is used here to be compatible
  44. with all the editors. Please contact ChrisW/RajeshM for more details.
  45. */
  46. MENUITEM "&Go To...\tCtrl+G", M_GOTO
  47. MENUITEM SEPARATOR
  48. MENUITEM "Select &All\tCtrl+A", M_SELECTALL
  49. MENUITEM "Time/&Date\tF5", M_DATETIME
  50. END
  51. POPUP "&View"
  52. BEGIN
  53. MENUITEM "&Status Bar", M_STATUSBAR
  54. END
  55. POPUP "F&ormat"
  56. BEGIN
  57. MENUITEM "&Word Wrap" M_WW
  58. MENUITEM "&Font...", M_SETFONT
  59. END
  60. POPUP "&Help"
  61. BEGIN
  62. MENUITEM "&Help Topics", M_HELP
  63. MENUITEM SEPARATOR
  64. MENUITEM "&About Notepad",M_ABOUT
  65. END
  66. END
  67. MainAcc ACCELERATORS PRELOAD DISCARDABLE
  68. BEGIN
  69. "N", M_NEW, VIRTKEY, CONTROL
  70. "O", M_OPEN, VIRTKEY, CONTROL
  71. "S", M_SAVE, VIRTKEY, CONTROL
  72. "P", M_PRINT, VIRTKEY, CONTROL
  73. VK_INSERT, M_COPY, VIRTKEY, CONTROL
  74. VK_F1, M_HELP, VIRTKEY
  75. VK_F3, M_FINDNEXT, VIRTKEY
  76. VK_F5, M_DATETIME, VIRTKEY
  77. "G", M_GOTO, VIRTKEY, CONTROL
  78. "F", M_FIND , VIRTKEY, CONTROL, NOINVERT
  79. "H", M_REPLACE, VIRTKEY, CONTROL, NOINVERT
  80. VK_BACK, M_UNDO, VIRTKEY, ALT
  81. "Z", M_UNDO, VIRTKEY, CONTROL
  82. "X", M_CUT, VIRTKEY, CONTROL
  83. "C", M_COPY, VIRTKEY, CONTROL
  84. "V", M_PASTE, VIRTKEY, CONTROL
  85. "A", M_SELECTALL,VIRTKEY, CONTROL
  86. END
  87. /* Allow exit using ^C, ^D or ^Z during Setup */
  88. SlipUpAcc ACCELERATORS PRELOAD DISCARDABLE
  89. BEGIN
  90. "N", M_NEW, VIRTKEY, CONTROL
  91. "O", M_OPEN, VIRTKEY, CONTROL
  92. "S", M_SAVE, VIRTKEY, CONTROL
  93. "P", M_PRINT, VIRTKEY, CONTROL
  94. VK_INSERT, M_COPY, VIRTKEY, CONTROL
  95. VK_F1, M_HELP, VIRTKEY
  96. VK_F3, M_FINDNEXT, VIRTKEY
  97. VK_F5, M_DATETIME, VIRTKEY
  98. "G", M_GOTO, VIRTKEY, CONTROL
  99. "F", M_FIND, VIRTKEY, CONTROL, NOINVERT
  100. "H", M_REPLACE, VIRTKEY, CONTROL, NOINVERT
  101. VK_BACK, M_UNDO, VIRTKEY, ALT
  102. "Z", M_UNDO, VIRTKEY, CONTROL
  103. "X", M_CUT, VIRTKEY, CONTROL
  104. "C", M_COPY, VIRTKEY, CONTROL
  105. "V", M_PASTE, VIRTKEY, CONTROL
  106. "A", M_SELECTALL,VIRTKEY, CONTROL
  107. VK_ESCAPE, M_EXIT, VIRTKEY
  108. 0x43, M_EXIT, VIRTKEY, CONTROL
  109. 0x44, M_EXIT, VIRTKEY, CONTROL
  110. 0x5A, M_EXIT, VIRTKEY, CONTROL
  111. END
  112. STRINGTABLE PRELOAD DISCARDABLE
  113. BEGIN
  114. IDS_MERGE1 "%%"
  115. IDS_DISKERROR "Cannot open the %% file.\n\nMake sure a disk is in the drive you specified."
  116. IDS_FNF "Cannot find the %% file.\n\nDo you want to create a new file?"
  117. IDS_SCBC "The text in the %% file has changed.\n\nDo you want to save the changes?"
  118. IDS_UNTITLED "Untitled"
  119. IDS_NOTEPAD " - Notepad"
  120. IDS_CFS "Cannot find ""%%"""
  121. /* The following is a generic out of memory message which can also be
  122. system modal so no /n can appear in it. */
  123. IDS_ERRSPACE "Not enough memory available to complete this operation. Quit one or more applications to increase available memory, and then try again."
  124. IDS_FTL "The %% file is too large for Notepad.\n\nUse another editor to edit the file."
  125. IDS_NN "Notepad"
  126. IDS_COMMDLGINIT "Failed to Initialize File Dialogs. Change the Filename and try again."
  127. 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."
  128. 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."
  129. IDS_NVF "Not a valid file name."
  130. IDS_CREATEERR "Cannot create the %% file.\n\nMake sure that the path and filename are correct."
  131. IDS_NOWW "Cannot carry out the Word Wrap command because there is too much text in the file."
  132. IDS_HELPFILE "notepad.hlp"
  133. IDS_HEADER "&f"
  134. IDS_FOOTER "Page &p"
  135. IDS_ACCESSDENY "%%\nYou do not have permission to open this file. See the owner of the file or an administrator to obtain permission."
  136. IDS_TEXTFILES "Text Files (*.txt)" /* filter text for File/Open */
  137. IDS_HTMLFILES "HTML Files (*.htm;*.html)" /* filter text for File/Open */
  138. IDS_XMLFILES "XML Files (*.xml)" /* filter text for File/Open */
  139. IDS_ENCODEDTEXT "Encoded Text Files (*.txt)" /* filter text for File/Open */
  140. IDS_ALLFILES "All Files" /* filter text for File/Open */
  141. IDS_MOREENCODING "More..."
  142. 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."
  143. 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."
  144. IDS_FONTTOOBIG "Page too small to print one line.\nTry printing using smaller font."
  145. IDS_COMMDLGERR "Common Dialog error (0x%04x)"
  146. IDS_LINEERROR "Notepad - Goto Line"
  147. IDS_LINETOOLARGE "Line number out of range"
  148. IDS_INVALIDCP "Invalid codepage"
  149. IDS_INVALIDIANA "Invalid encoding"
  150. IDS_ENCODINGMISMATCH "The encoding declared in the file doesn't match the selected encoding. Save in the declared encoding instead?"
  151. IDS_CURRENT_PAGE "Page %d" /* don't change %d; used for printf formatting */
  152. IDS_LINECOL " Ln %d, Col %d "
  153. IDS_COMPRESSED_FILE " Compressed,"
  154. IDS_ENCRYPTED_FILE " Encrypted,"
  155. IDS_HIDDEN_FILE " Hidden,"
  156. IDS_OFFLINE_FILE " Offline,"
  157. IDS_READONLY_FILE " ReadOnly,"
  158. IDS_SYSTEM_FILE " System,"
  159. IDS_FILE " File"
  160. IDS_NOSTATUSAVAIL " Cursor location not available "
  161. END
  162. /* Include other dialogs. */
  163. rcinclude notepad.dlg
  164. #include <ntverp.h>
  165. #include "common.ver"