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.

309 lines
17 KiB

  1. #include <windows.h>
  2. #include "progman.h"
  3. #include "taskman.h"
  4. /* HACK!!!! The DOS application icon must be the second icon in the resource
  5. * table in order for the default DOS app icon to be selected correctly in
  6. * the icon chooser/new item thingy.
  7. */
  8. PROGMANICON ICON PRELOAD progman.ico
  9. DOSAPPICON ICON winoldap.ico
  10. WORDICON ICON PRELOAD MOVEABLE pmword.ico // not discardable!
  11. SHEETICON ICON pmsheet.ico
  12. DATAICON ICON pmdata.ico
  13. COMMICON ICON pmcomm.ico
  14. ITEMICON ICON PRELOAD pmitem.ico
  15. PERSGROUPICON ICON PRELOAD personal.ico
  16. COMMGROUPICON ICON common.ico
  17. WINDOWSICON ICON windows.ico
  18. MSDOSICON ICON msdos.ico
  19. /* the following icons are in the icon library contained in progman. Their
  20. id's will start with WINDOWSICON+10 to allow for addition of more 'real'
  21. icons before the library starts... */
  22. 110 ICON icons\objects\arttools.ico
  23. 111 ICON icons\objects\barchart.ico
  24. 112 ICON icons\objects\camera.ico
  25. 113 ICON icons\objects\cd.ico
  26. 114 ICON icons\objects\charts.ico
  27. 115 ICON icons\objects\clapbrd.ico
  28. 116 ICON icons\objects\draft.ico
  29. 117 ICON icons\objects\fancydoc.ico
  30. 118 ICON icons\objects\filmstrp.ico
  31. 119 ICON icons\objects\graph.ico
  32. 120 ICON icons\objects\hndshake.ico
  33. 121 ICON icons\objects\knife.ico
  34. 122 ICON icons\objects\letters.ico
  35. 123 ICON icons\objects\mona.ico
  36. 124 ICON icons\objects\news.ico
  37. 125 ICON icons\objects\phone.ico
  38. 126 ICON icons\objects\plaindoc.ico
  39. 127 ICON icons\objects\spredsht.ico
  40. 128 ICON icons\objects\sticky.ico
  41. 129 ICON icons\objects\tape.ico
  42. 130 ICON icons\objects\typewrit.ico
  43. 131 ICON icons\contain\brfcase.ico
  44. 132 ICON icons\contain\door.ico
  45. 133 ICON icons\contain\lenvel.ico
  46. 134 ICON icons\contain\mailbox.ico
  47. 135 ICON icons\contain\safe.ico
  48. 136 ICON icons\hyper\help.ico
  49. 137 ICON icons\hyper\alert.ico
  50. 138 ICON icons\hyper\exit.ico
  51. 139 ICON icons\hyper\handl.ico
  52. 140 ICON icons\hyper\handr.ico
  53. 141 ICON icons\hyper\handstop.ico
  54. 142 ICON icons\hyper\darrow.ico
  55. 143 ICON icons\hyper\larrow.ico
  56. 144 ICON icons\hyper\rarrow.ico
  57. 145 ICON icons\hyper\uarrow.ico
  58. //
  59. // put these 2 icons at the end to not change the order of the icons in
  60. // progman, so items using progman's icons keeep the expected icon selection.
  61. //
  62. GROUPICON ICON pmgroup.ico
  63. 147 ICON console.ico
  64. PMACCELS ACCELERATORS PRELOAD
  65. BEGIN
  66. VK_RETURN, IDM_OPEN, VIRTKEY, NOINVERT
  67. VK_RETURN, IDM_OPEN, VIRTKEY, SHIFT
  68. /* REVIEW Additions by IanEl. */
  69. VK_RETURN, IDM_PROPS, VIRTKEY, ALT
  70. VK_DELETE, IDM_DELETE, VIRTKEY
  71. VK_F5, IDM_CASCADE, VIRTKEY, SHIFT
  72. VK_F4, IDM_TILE, VIRTKEY, SHIFT
  73. VK_F1, IDM_HELPINDEX, VIRTKEY
  74. VK_F7, IDM_MOVE, VIRTKEY
  75. VK_F8, IDM_COPY, VIRTKEY
  76. END
  77. PROGMANMENU MENU PRELOAD
  78. BEGIN
  79. POPUP "&File"
  80. BEGIN
  81. MENUITEM "&New...", IDM_NEW
  82. MENUITEM "&Open\tEnter", IDM_OPEN
  83. MENUITEM "&Move...\tF7", IDM_MOVE
  84. MENUITEM "&Copy...\tF8", IDM_COPY
  85. MENUITEM "&Delete\tDel", IDM_DELETE
  86. MENUITEM "&Properties...\tAlt+Enter", IDM_PROPS
  87. MENUITEM SEPARATOR
  88. MENUITEM "&Run...", IDM_RUN
  89. MENUITEM SEPARATOR
  90. #ifdef DOSWIN32
  91. MENUITEM "E&xit Windows...", IDM_EXIT
  92. #else
  93. MENUITEM "&Logoff...", IDM_EXIT
  94. MENUITEM "&Shutdown...", IDM_SHUTDOWN
  95. #endif
  96. END
  97. POPUP "&Options"
  98. BEGIN
  99. MENUITEM "&Auto Arrange", IDM_AUTOARRANGE
  100. MENUITEM "&Minimize on Use", IDM_MINONRUN
  101. MENUITEM "&Save Settings on Exit", IDM_SAVESETTINGS
  102. MENUITEM SEPARATOR
  103. MENUITEM "Save Settings &Now", IDM_SAVENOW
  104. #if 0
  105. MENUITEM SEPARATOR
  106. MENUITEM "&Shortcut Key...", IDM_HOTKEY
  107. #endif
  108. END
  109. POPUP "&Window"
  110. BEGIN
  111. MENUITEM "&Cascade\tShift+F5", IDM_CASCADE
  112. MENUITEM "&Tile\tShift+F4", IDM_TILE
  113. MENUITEM "&Arrange Icons", IDM_ARRANGEICONS
  114. END
  115. POPUP "&Help"
  116. BEGIN
  117. MENUITEM "&Contents", IDM_HELPINDEX
  118. MENUITEM "&Search for Help on..." IDM_HELPSEARCH
  119. MENUITEM "&How to Use Help", IDM_HELPHELP
  120. #if 0
  121. MENUITEM "&Index", IDM_HELPINDEX
  122. MENUITEM "&Keyboard", IDM_HELPKEYS
  123. MENUITEM "&Basic Skills", IDM_HELPBASIC
  124. MENUITEM "&Commands", IDM_HELPCOMMANDS
  125. MENUITEM "&Procedures", IDM_HELPPROCS
  126. MENUITEM "&Glossary", IDM_HELPGLOSSARY
  127. MENUITEM "&Using Help", IDM_HELPHELP
  128. #endif
  129. MENUITEM SEPARATOR
  130. MENUITEM "&About Program Manager...",IDM_ABOUT
  131. END
  132. END
  133. /* 0....5....1....56...2....5....3.2..5....4....5....5....6...45....7....5....8....5....9....5....0....5....1....5....2....5..8 */
  134. STRINGTABLE PRELOAD
  135. BEGIN /* Maximum # of chars: */
  136. IDS_APPTITLE, "Program Manager" /* 32 */
  137. IDS_PMCLASS, "Progman" /* 16 */
  138. IDS_GROUPCLASS, "PMGroup" /* 16 */
  139. IDS_ITEMCLASS, "PMItem" /* 16 */
  140. IDS_SETTINGS, "Settings" /* 32 */
  141. IDS_STARTUP, "Start Up" /* Default name of startup group */
  142. IDS_CONFIRMDELTITLE, "Delete" /* 32 */
  143. IDS_CONFIRMDELITEMMSG, "Are you sure you want to delete item '%s'?" /* 128 */
  144. IDS_CONFIRMDELGROUPMSG, "Are you sure you want to delete group '%s'?" /* 128 */
  145. IDS_NOICONSTITLE, "Change Icon" /* 32 */
  146. IDS_NOICONSMSG1, "There are no icons available for the file specified. \n\nYou can choose an icon from those available for Program Manager." /* 128 */
  147. IDS_NOICONSMSG, "Cannot find any icons in this file" /* 128 */
  148. IDS_BADPATHTITLE, "Invalid Path" /* 32 */
  149. IDS_BADPATHMSG, "The path %s is invalid." /* 128 */
  150. IDS_BADPATHMSG2, "There is no association for %s." /* 128 */
  151. IDS_BADPATHMSG3, "The working directory is invalid." /* 128 */
  152. IDS_NETPATHTITLE, "Network Path Specified" /* 32 */
  153. IDS_REMOVEPATHTITLE, "Removable Path Specified" /* 32 */
  154. IDS_PATHWARNING, "The specified path points to a file that may not be available during later Windows sessions. Do you want to continue?" /* 128 */
  155. IDS_EXECERRTITLE, "Application Execution Error" /* 32 */
  156. IDS_UNKNOWNMSG, "Unexpected DOS error: %d." /* 125!*/
  157. IDS_NOMEMORYMSG, "Insufficient memory to run this application; close one or more Windows applications and try again." /* 128 */
  158. IDS_INSUFFICIENTQUOTA, "Not enough quota is available to process this command."
  159. IDS_FILENOTFOUNDMSG, "Cannot find file %s (or one of its components); check to ensure the path and filename are correct and that all required libraries are available." /* 128 */
  160. IDS_MANYOPENFILESMSG, "Too many other files are currently in use." /* 128 */
  161. IDS_NOASSOCMSG, "No association exists for the specified file." /* 128 */
  162. IDS_ASSOCINCOMPLETE, "Cannot open file. Start the application used to create this file, and open it from there."
  163. IDS_MULTIPLEDSMSG, "Cannot start more than one copy of the specified program." /* 128 */
  164. IDS_OS2APPMSG "The specified application is not a Windows or DOS program." /* 128 */
  165. IDS_NEWWINDOWSMSG, "This application requires a newer version of Microsoft Windows." /* 128 */
  166. IDS_PMODEONLYMSG, "This application requires Standard or Enhanced Mode Windows." /* 128 */
  167. IDS_ACCESSDENIED, "Access to the specified device, path or file is denied." /* 128 */
  168. IDS_DDEFAIL, "An error occurred sending the command to the application." /* 128 */
  169. IDS_COMPRESSEDEXE "This program or one of its components is compressed.\n\nPlease uncompress it and try again."
  170. IDS_INVALIDDLL "One of the library files needed to run this application is damaged. Please reinstall this application."
  171. IDS_SHAREERROR "This file is in use by some other application."
  172. IDS_COPYDLGTITLE, "Copy Program Item" /* 32 */
  173. IDS_COPYDLGTITLE1, "Copy Program Item:" /* 32 */
  174. IDS_GROUPS, "Groups" /* 32 */
  175. // This is used when restrictions will stop progman from patching the
  176. // ini file.
  177. IDS_NOGRPFILE, "Cannot open program group '%s'" /* 128 */
  178. // This one is used when there are no restrictions. We give the user the
  179. // option of patching the ini file.
  180. IDS_NOGRPFILE2, "Cannot open program group '%s'. Do you want the Program Manager to still try to load it in the future ?" /* 128 */
  181. IDS_LOWMEM, "Insufficient memory to perform this operation; close one or more Windows applications and try again." /* 128 */
  182. IDS_BADFILE, "Program group '%s' is invalid or damaged; recreate the group." /* 128 */
  183. IDS_CANTWRITEGRP, "Cannot save program group '%s' because of insufficient memory." /* 128 */
  184. IDS_CANTWRITEGRPS, "Cannot save program groups because conversion to original format failed."
  185. // IDS_CANTWRITEGRPDISK, "Cannot save program group '%s'; you may need to delete some files to free disk space" /* 128 */
  186. IDS_GRPISRO, "Program group '%s' is write-protected. Its contents will not be updated." /* 128 */
  187. IDS_GROUPFILEERR, "Group Error" /* 32 */
  188. IDS_EXTRACTERROR, "Icon Extraction Error" /* 32 */
  189. IDS_EEGROUPRO, "Program group '%s' is write-protected. Its icons cannot be updated for the new display device." /* 128 */
  190. IDS_GROUPRO, "Program group '%s' is write-protected. The program group cannot be modified." /* 128 */
  191. IDS_OOMEXITTITLE, "Extremely Low on Memory" /* 32 */
  192. IDS_OOMEXITMSG, "Close an application and try again." /* 64 */
  193. IDS_DUPHOTKEYTTL, "Duplicate Shortcut Key" /* 32 */
  194. IDS_DUPHOTKEYMSG, "%s is using the same shortcut key: Press OK to accept this or Cancel to select a new key." /* MAXMESSAGE */
  195. IDS_CANTRENAMETITLE, "Group Properties Error" /* 32 */
  196. IDS_CANTRENAMEMSG, "Cannot rename the program group information." /* 64 */
  197. IDS_TOOMANYITEMS "This program group already contains the maximum number of items."
  198. IDS_ALREADYLOADED "This program group is already loaded."
  199. IDS_PLUS " + " /* hot key separator */
  200. IDS_GRPHASCHANGED "The program group has been modified by another program or user and will be reloaded; try the operation again."
  201. IDS_NONE "None" /* no hotkey */
  202. IDS_EXIT "E&xit" /* if not shell replaces exit windows */
  203. IDS_LOGOFF "&Logoff..."
  204. IDS_SHUTDOWN "S&hutdown..."
  205. IDS_PROPERTIESPROGS "Programs#*.exe;*.pif;*.com;*.bat;*.cmd#All Files (*.*)#*.*#"
  206. IDS_CHNGICONPROGS "Icon Files#*.ico;*.exe;*.dll#Programs (*.exe)#*.exe#Libraries (*.dll)#*.dll#Icons (*.ico)#*.ico#All Files (*.*)#*.*#"
  207. IDS_BROWSE "Browse"
  208. IDS_TOOMANYGROUPS "You have created the maximum number of personal groups possible in Program Manager.\nTo create a new group you must first delete a personal group to make room."
  209. IDS_TOOMANYCOMMONGROUPS "You have created the maximum number of common groups possible in Program Manager.\nTo create a new group you must first delete a common group to make room."
  210. IDS_LOWMEMONINIT "Extremely Low on Memory, unable to load group %s."
  211. IDS_PIFINIFILE "PIF.INF" /*16*/
  212. IDS_PIFSECTION "pif" /*32*/
  213. IDS_EXECSETUP "setup /@ " /*MAXITEMPATHLEN+1*/
  214. // These messages are inserted into some of the exec error messages above.
  215. // For the first two we do a ' + filename + IDS_... and insert it as %s
  216. // into IDS_FILENOTFOUND (for example). The last one is just a simple
  217. // insert and no mention is made of the file name. The list of messages
  218. // that these things can be inserted into is in pmcomman.c/ExecProgram.
  219. // To check these messages are OK you'll need something invalid on the
  220. // command line, in the load= line in win.ini or in the startup group.
  221. IDS_WININIERR "' specified in win.ini"
  222. IDS_STARTUPERR "' specified in the startup group"
  223. IDS_CMDLINEERR "' specified on the command line"
  224. IDS_WINHELPERR "Unable to show help information."
  225. IDS_ITEMINGROUP "Item '%s' in group '%s' " /*64*/
  226. /* Take care with this message, it is almost the maximum length */
  227. IDS_LOWMEMONEXTRACT "There is not enough memory to convert all the program icons.\nThe icons which are not converted will appear black.You can\nfix this by choosing FILE.PROPERTIES from the program manager\n(with the defective item highlighted)
  228. nd pressing OK."
  229. IDS_DEFICONSFILE "progman.exe"
  230. IDS_COMMDLGLOADERR "Unable to load a library required for this operation."
  231. IDS_REGISTRYERROR "An error has occurred in the registry.\nThe Program Manager's settings and groups cannot be accessed."
  232. IDS_ERRORDELETEGROUP "Could not delete the group %s."
  233. IDS_COMMONGRPSUFFIX " (Common)"
  234. IDS_COMMONGROUPPROP "Common Program Group Properties"
  235. IDS_COMMONGROUPERR, "Common Group Error" /* 32 */
  236. IDS_NOCOMMONGRPS, "The Common Program Groups cannot be accessed. Do you want to create a Personal Program Group?"
  237. IDS_DEFAULTSTARTUP "startup"
  238. IDS_NO_PERMISSION_SHUTDOWN "You do not have permission to shutdown this computer."
  239. IDS_SHUTDOWN_MESSAGE "Shutdown Computer"
  240. IDS_MSGBOXSTR1, "The application has chosen not to close. It may be completing a lengthy task. "
  241. IDS_MSGBOXSTR2, "Forcing the application to close may lose data. Do you wish to force the application to close?"
  242. IDS_ANSIGROUPSMENU "&Update Program Groups"
  243. //#ifdef JAPAN
  244. //for Bad port name
  245. // IDS_BADPORTPATHTITLE, "�����ȃt�@�C�����ł��B" /* 32 */
  246. // IDS_BADPORTPATHMSG, "%s\n\r���̃t�@�C�����̓f�o�C�X���Ƃ��ė\�񂳂��Ă��܂��B\n�ق��̃t�@�C�������w�肵�Ă��������B"
  247. //#endif
  248. END
  249. #include "progman.dlg"
  250. #include <ntverp.h>
  251. #define VER_FILETYPE VFT_APP
  252. #define VER_FILESUBTYPE VFT2_UNKNOWN
  253. #define VER_FILEDESCRIPTION_STR "Program Manager"
  254. #define VER_INTERNALNAME_STR "progman\0"
  255. #define VER_ORIGINALFILENAME_STR "PROGMAN.EXE"
  256. #include "common.ver"