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.

703 lines
25 KiB

  1. /*++ BUILD Version: 0002 - Increment this if a change has global effects
  2. /****************************************************************************/
  3. /* */
  4. /* PROGMAN.H - */
  5. /* */
  6. /* Include for the Windows Program Manager */
  7. /* */
  8. /****************************************************************************/
  9. #ifndef RC_INVOKED
  10. #include <nt.h>
  11. #include <ntrtl.h>
  12. #include <nturtl.h>
  13. #endif
  14. #include <setjmp.h>
  15. #include <string.h>
  16. #include <stdlib.h>
  17. #include <windows.h>
  18. #include <winuserp.h>
  19. #ifndef RC_INVOKED
  20. #include "port1632.h"
  21. #undef RDW_VALIDMASK
  22. #endif
  23. #include <pmvdm.h>
  24. #include "pmhelp.h"
  25. #include "shellapi.h"
  26. #include "shlapip.h"
  27. /*--------------------------------------------------------------------------*/
  28. /* */
  29. /* Typedefs */
  30. /* */
  31. /*--------------------------------------------------------------------------*/
  32. typedef struct tagITEM {
  33. struct tagITEM *pNext; /* link to next item */
  34. int iItem; /* index in group */
  35. DWORD dwDDEId; /* id used for Apps querying Progman */
  36. /* for its properties via DDE */
  37. RECT rcIcon; /* icon rectangle */
  38. HICON hIcon; /* the actual icon */
  39. RECT rcTitle; /* title rectangle */
  40. } ITEM, *PITEM;
  41. typedef struct tagGROUP {
  42. struct tagGROUP *pNext; /* link to next group */
  43. HWND hwnd; /* hwnd of group window */
  44. HANDLE hGroup; /* global handle of group object */
  45. PITEM pItems; /* pointer to first item */
  46. LPTSTR lpKey; /* name of group key */
  47. WORD wIndex; /* index in PROGMAN.INI of group */
  48. BOOL fRO; /* group file is readonly */
  49. BOOL fCommon; /* group is a common group vs a personal group */
  50. FILETIME ftLastWriteTime;
  51. HBITMAP hbm; /* bitmap 'o icons */
  52. WORD fLoaded;
  53. PSECURITY_DESCRIPTOR pSecDesc;
  54. } GROUP, *PGROUP;
  55. /*
  56. * .GRP File format structures -
  57. */
  58. typedef struct tagGROUPDEF {
  59. DWORD dwMagic; /* magical bytes 'PMCC' */
  60. DWORD cbGroup; /* length of group segment */
  61. RECT rcNormal; /* rectangle of normal window */
  62. POINT ptMin; /* point of icon */
  63. WORD wCheckSum; /* adjust this for zero sum of file */
  64. WORD nCmdShow; /* min, max, or normal state */
  65. DWORD pName; /* name of group */
  66. /* these four change interpretation */
  67. WORD cxIcon; /* width of icons */
  68. WORD cyIcon; /* hieght of icons */
  69. WORD wIconFormat; /* planes and BPP in icons */
  70. WORD wReserved; /* This word is no longer used. */
  71. WORD cItems; /* number of items in group */
  72. WORD Reserved1;
  73. DWORD Reserved2;
  74. DWORD rgiItems[1]; /* array of ITEMDEF offsets */
  75. } GROUPDEF, *PGROUPDEF;
  76. typedef GROUPDEF *LPGROUPDEF;
  77. typedef struct tagITEMDEF {
  78. POINT pt; /* location of item icon in group */
  79. WORD iIcon; /* id of item icon */
  80. WORD wIconVer; /* icon version */
  81. WORD cbIconRes; /* size of icon resource */
  82. WORD wIconIndex; /* index of the item icon (not the same as the id) */
  83. DWORD pIconRes; /* offset of icon resource */
  84. DWORD pName; /* offset of name string */
  85. DWORD pCommand; /* offset of command string */
  86. DWORD pIconPath; /* offset of icon path */
  87. } ITEMDEF, *PITEMDEF;
  88. typedef ITEMDEF *LPITEMDEF;
  89. /* the pointers in the above structures are short pointers relative to the
  90. * beginning of the segments. This macro converts the short pointer into
  91. * a long pointer including the proper segment/selector value. It assumes
  92. * that its argument is an lvalue somewhere in a group segment, for example,
  93. * PTR(lpgd->pName) returns a pointer to the group name, but k=lpgd->pName;
  94. * PTR(k) is obviously wrong as it will use either SS or DS for its segment,
  95. * depending on the storage class of k.
  96. */
  97. #define PTR(base, offset) (LPBYTE)((PBYTE)base + offset)
  98. /* PTR2 is used for those cases where a variable already contains an offset
  99. * (The "case that doesn't work", above)
  100. */
  101. #define PTR2(lp,offset) ((LPBYTE)MAKELONG(offset,HIWORD(lp)))
  102. /* this macro is used to retrieve the i-th item in the group segment. Note
  103. * that this pointer will NOT be NULL for an unused slot.
  104. */
  105. #define ITEM(lpgd,i) ((LPITEMDEF)PTR(lpgd, lpgd->rgiItems[i]))
  106. /*--------------------------------------------------------------------------*/
  107. /* */
  108. /* Tag Stuff */
  109. /* */
  110. /*--------------------------------------------------------------------------*/
  111. typedef struct _tag
  112. {
  113. WORD wID; // tag identifier
  114. WORD dummy1; // need this for alignment!
  115. int wItem; // (unde the covers 32 bit point!)item the tag belongs to
  116. WORD cb; // size of record, including id and count
  117. WORD dummy2; // need this for alignment!
  118. BYTE rgb[1];
  119. } PMTAG, FAR * LPPMTAG;
  120. #define PMTAG_MAGIC GROUP_MAGIC
  121. /* range 8000 - 80FF > global
  122. * range 8100 - 81FF > per item
  123. * all others reserved
  124. */
  125. #define ID_MAINTAIN 0x8000
  126. /* bit used to indicate a tag that should be kept even if the writer
  127. * doesn't recognize it.
  128. */
  129. #define ID_MAGIC 0x8000
  130. /* data: the string 'TAGS'
  131. */
  132. #define ID_WRITERVERSION 0x8001
  133. /* data: string in the form [9]9.99[Z].99
  134. */
  135. #define ID_APPLICATIONDIR 0x8101
  136. /* data: ASCIZ string of directory where application may be
  137. * located.
  138. * this is defined as application dir rather than default dir
  139. * since the default dir is explicit in the 3.0 command line and
  140. * must stay there. The true "new information" is the application
  141. * directory. If not present, search the path.
  142. */
  143. #define ID_HOTKEY 0x8102
  144. /* data: WORD hotkey index
  145. */
  146. #define ID_MINIMIZE 0x8103
  147. /* data none
  148. */
  149. #define ID_NEWVDM 0x8104
  150. /* data none
  151. */
  152. #define ID_LASTTAG 0xFFFF
  153. /* the last tag in the file
  154. */
  155. /*--------------------------------------------------------------------------*/
  156. /* */
  157. /* For Icon Extraction */
  158. /* */
  159. /*--------------------------------------------------------------------------*/
  160. typedef struct _MyIconInfo {
  161. HICON hIcon;
  162. INT iIconId;
  163. } MYICONINFO, *LPMYICONINFO;
  164. /*--------------------------------------------------------------------------*/
  165. /* */
  166. /* Function Templates */
  167. /* */
  168. /*--------------------------------------------------------------------------*/
  169. BOOL FAR PASCAL IsRemoteDrive(int);
  170. BOOL FAR PASCAL IsRemovableDrive(int);
  171. int FAR PASCAL MyMessageBox(HWND, WORD, WORD , LPTSTR , WORD);
  172. BOOL FAR PASCAL AppInit(HANDLE, LPTSTR , int);
  173. void FAR PASCAL BuildDescription(LPTSTR, LPTSTR);
  174. WORD FAR PASCAL ExecProgram(LPTSTR, LPTSTR, LPTSTR, BOOL, DWORD, WORD, BOOL);
  175. void FAR PASCAL ExecItem(PGROUP,PITEM,BOOL,BOOL);
  176. WORD FAR PASCAL SelectionType(void);
  177. BOOL APIENTRY ProgmanCommandProc(HWND, WPARAM, LPARAM);
  178. void FAR PASCAL WriteINIFile(void);
  179. void FAR PASCAL ArrangeItems(HWND);
  180. void FAR PASCAL WriteGroupsSection(void);
  181. LRESULT APIENTRY DDEMsgProc(HWND, UINT, WPARAM, LPARAM);
  182. LRESULT APIENTRY AppIconDDEMsgProc(HWND, UINT, WPARAM, LPARAM);
  183. LRESULT APIENTRY AppDescriptionDDEMsgProc(HWND, UINT, WPARAM, LPARAM);
  184. LRESULT APIENTRY AppWorkingDirDDEMsgProc(HWND, UINT, WPARAM, LPARAM);
  185. BOOL FAR PASCAL IsGroupReadOnly(LPTSTR szGroupKey, BOOL bCommonGroup);
  186. LPGROUPDEF FAR PASCAL LockGroup(HWND);
  187. void FAR PASCAL UnlockGroup(HWND);
  188. LPITEMDEF FAR PASCAL LockItem(PGROUP, PITEM);
  189. HICON FAR PASCAL GetItemIcon(HWND, PITEM);
  190. HWND FAR PASCAL LoadGroupWindow(LPTSTR, WORD, BOOL);
  191. PITEM FAR PASCAL CreateNewItem(HWND,LPTSTR,LPTSTR,LPTSTR,LPTSTR,WORD,BOOL,WORD,WORD,HICON,LPPOINT,DWORD);
  192. HWND FAR PASCAL CreateNewGroup(LPTSTR, BOOL);
  193. void FAR PASCAL DeleteItem(PGROUP, PITEM);
  194. void FAR PASCAL DeleteGroup(HWND);
  195. void FAR PASCAL ChangeGroupTitle(HWND, LPTSTR, BOOL);
  196. void FAR PASCAL CreateItemIcons(HWND);
  197. void FAR PASCAL GetItemText(PGROUP,PITEM,LPTSTR,int);
  198. void FAR PASCAL InvalidateIcon(PGROUP,PITEM);
  199. void FAR PASCAL ComputeIconPosition(PGROUP,POINT,LPRECT,LPRECT,LPTSTR);
  200. void FAR PASCAL CalcGroupScrolls(HWND);
  201. BOOL FAR PASCAL GroupCheck(PGROUP);
  202. void FAR PASCAL UnloadGroupWindow(HWND);
  203. void FAR PASCAL NukeIconBitmap(PGROUP pGroup);
  204. WORD FAR PASCAL GroupFlag(PGROUP, PITEM, WORD);
  205. WORD FAR PASCAL GetGroupTag(PGROUP, PITEM, WORD, LPTSTR, WORD);
  206. VOID FAR PASCAL LoadAllGroups(VOID);
  207. PITEM FAR PASCAL DuplicateItem(PGROUP,PITEM,PGROUP,LPPOINT);
  208. void FAR PASCAL GetItemCommand(PGROUP,PITEM,LPTSTR,LPTSTR);
  209. VOID APIENTRY RegisterDDEClasses(HANDLE);
  210. INT MyDwordAlign(INT);
  211. LRESULT APIENTRY GroupWndProc(HWND , UINT, WPARAM, LPARAM);
  212. LRESULT APIENTRY ProgmanWndProc(HWND , UINT , WPARAM, LPARAM );
  213. WORD FAR PASCAL MyDialogBox(WORD, HWND , DLGPROC );
  214. INT_PTR APIENTRY ChooserDlgProc(HWND , UINT , WPARAM , LPARAM );
  215. INT_PTR APIENTRY BrowseDlgProc(HWND, UINT , WPARAM , LPARAM );
  216. INT_PTR APIENTRY RunDlgProc(HWND , UINT , WPARAM , LPARAM );
  217. INT_PTR APIENTRY ExitDlgProc(HWND, UINT, WPARAM, LPARAM);
  218. INT_PTR APIENTRY IconDlgProc(HWND , UINT , WPARAM , LPARAM );
  219. INT_PTR APIENTRY NewItemDlgProc(HWND , UINT , WPARAM , LPARAM );
  220. INT_PTR APIENTRY NewGroupDlgProc(HWND , UINT , WPARAM , LPARAM );
  221. INT_PTR APIENTRY MoveItemDlgProc(HWND , UINT , WPARAM , LPARAM );
  222. INT_PTR APIENTRY CopyItemDlgProc(HWND , UINT , WPARAM , LPARAM );
  223. INT_PTR APIENTRY EditItemDlgProc(HWND , UINT , WPARAM , LPARAM );
  224. INT_PTR APIENTRY EditGroupDlgProc(HWND, UINT , WPARAM , LPARAM );
  225. INT_PTR APIENTRY AboutDlgProc(HWND , UINT , WPARAM , LPARAM );
  226. INT_PTR APIENTRY HotKeyDlgProc(HWND , UINT , WPARAM , LPARAM );
  227. BOOL APIENTRY ShutdownDialog(HANDLE, HWND);
  228. INT_PTR APIENTRY NewLogoffDlgProc(HWND, UINT, WPARAM, LPARAM);
  229. INT_PTR APIENTRY UpdateGroupsDlgProc(HWND, UINT, WPARAM, LPARAM);
  230. VOID APIENTRY HandleDosApps
  231. (
  232. LPTSTR sz // Full path sans arguments.
  233. );
  234. DWORD APIENTRY ValidatePath
  235. (
  236. HWND hDlg,
  237. LPTSTR szPath, // Path to item
  238. LPTSTR szExePath, // Path to associated exe.
  239. LPTSTR szDir // Path to working directory.
  240. );
  241. VOID APIENTRY GetDirectoryFromPath
  242. (
  243. LPTSTR szFilePath, // Full path to a file.
  244. LPTSTR szDir // Directory returned in here, the buffer is assumed
  245. // to be as big as szFilePath.
  246. );
  247. VOID APIENTRY GetFilenameFromPath
  248. (
  249. LPTSTR szPath,
  250. LPTSTR szFilename
  251. );
  252. void APIENTRY TagExtension
  253. (
  254. LPTSTR szPath,
  255. UINT cbPath
  256. );
  257. void APIENTRY StripArgs
  258. (
  259. LPTSTR szCmmdLine // A command line.
  260. );
  261. BOOL APIENTRY ValidPathDrive
  262. (
  263. LPTSTR lpstr
  264. );
  265. LRESULT APIENTRY MessageFilter(int , WPARAM , LPARAM) ;
  266. BOOL APIENTRY SaveGroup(HWND, BOOL);
  267. BOOL SaveGroupsContent(BOOL);
  268. BOOL IsReadOnly(LPTSTR);
  269. VOID FAR PASCAL StartupGroup(HWND hwnd);
  270. VOID APIENTRY PMHelp(HWND);
  271. VOID FAR PASCAL RemoveLeadingSpaces(LPTSTR sz);
  272. VOID FAR PASCAL BringItemToTop(PGROUP pGroup, PITEM pItem, BOOL fUpdate);
  273. VOID APIENTRY SaveRecentFileList (HWND hwnd, LPTSTR szCurrentFile, WORD idControl);
  274. /*--------------------------------------------------------------------------*/
  275. /* */
  276. /* Defines */
  277. /* */
  278. /*--------------------------------------------------------------------------*/
  279. #define CharSizeOf(x) (sizeof(x) / sizeof(*x))
  280. #define ByteCountOf(x) ((x) * sizeof(TCHAR))
  281. #define CITEMSMAX 50
  282. //
  283. // CreateNewItem flags
  284. //
  285. #define CI_ACTIVATE 0x1
  286. #define CI_SET_DOS_FULLSCRN 0x2
  287. #define CI_NO_ASSOCIATION 0x4
  288. #define CI_SEPARATE_VDM 0x8
  289. /* magic number for .GRP file validation
  290. */
  291. #define GROUP_MAGIC 0x43434D50L /* 'PMCC' */
  292. #define GROUP_UNICODE 0x43554D50L /* 'PMUC' */
  293. #define MAXTITLELEN 50 /* Length of MessageBox titles */
  294. #define MAXMESSAGELEN 512 /* Length of MessageBox messages */
  295. #define MAXITEMNAMELEN 40
  296. //#define MAXITEMPATHLEN 64+16+48 /* Path + 8.3 + Drive(colon) + arguments */
  297. #define MAXITEMPATHLEN MAX_PATH - 1 // -1 for backward compatibility
  298. // with shell32.dll
  299. #define MAXGROUPNAMELEN 30
  300. #define NSLOTS 16 /* initial number of items entries */
  301. #define PATH_INVALID 0
  302. #define PATH_INVALID_OK 1
  303. #define PATH_VALID 2
  304. #define CCHGROUP 5 // length of the string "Group"
  305. #define CCHCOMMONGROUP 6 // length of the string "CGroup"
  306. #define CGROUPSMAX 40 // The max number of groups allowed.
  307. #define TYPE_ITEM 0
  308. #define TYPE_PERSGROUP 1
  309. #define TYPE_COMMONGROUP 2
  310. /* Resource Numbers */
  311. #define PROGMANICON 1
  312. #define DOSAPPICON 2
  313. #define WORDICON 3
  314. #define SHEETICON 4
  315. #define DATAICON 5
  316. #define COMMICON 6
  317. #define ITEMICON 7
  318. #define PERSGROUPICON 8
  319. #define COMMGROUPICON 9
  320. #define WINDOWSICON 10 /* Should be large ? */
  321. #define MSDOSICON 11
  322. #define PMACCELS 1004
  323. #define PROGMANMENU 1005
  324. #define GROUPICON 146
  325. #define DOSAPPICONINDEX 1
  326. #define ITEMICONINDEX 6
  327. #define ITEMLISTBOX 1
  328. #define GWLP_PGROUP 0 // Used in the Group window frames
  329. #define GWL_EXITING 0 // Used in the main window frame
  330. #define DRAG_SWP 1
  331. #define DRAG_COPY 2
  332. /* DDE Messaging Stuff */
  333. #define ACK_POS 0x8000
  334. #define ACK_NEG 0x0000
  335. // message sent to indicate another instance has been exec'd
  336. #define WM_EXECINSTANCE (WM_USER+100)
  337. // message sent to reload a group
  338. #define WM_RELOADGROUP (WM_USER+101)
  339. // message sent to delete a group
  340. #define WM_UNLOADGROUP (WM_USER+102)
  341. // Lock errors
  342. #define LOCK_LOWMEM 1
  343. #define LOCK_FILECHANGED 2
  344. // Binary type defins
  345. #define BINARY_TYPE_DEFAULT 1
  346. #define BINARY_TIMEOUT_DEFAULT 500
  347. // Recent file list defines
  348. #define MYCBN_SELCHANGE (WM_USER+5)
  349. #define INIT_MAX_FILES 4
  350. #define FILES_KEY L"Software\\Microsoft\\Windows NT\\CurrentVersion\\Program Manager\\Recent File List"
  351. #define MAXFILES_ENTRY L"Max Files"
  352. #define FILE_ENTRY L"File%lu"
  353. /* Menu Command Defines */
  354. #define IDM_FILE 0
  355. #define IDM_NEW 101
  356. #define IDM_OPEN 102
  357. #define IDM_MOVE 103
  358. #define IDM_COPY 104
  359. #define IDM_DELETE 105
  360. #define IDM_PROPS 106
  361. #define IDM_RUN 107
  362. #define IDM_EXIT 108
  363. #define IDM_SAVE 109
  364. #define IDM_SHUTDOWN 110
  365. #define IDM_OPTIONS 1
  366. #define IDM_AUTOARRANGE 201
  367. #define IDM_MINONRUN 202
  368. #define IDM_HOTKEY 203
  369. #define IDM_SAVESETTINGS 204
  370. #define IDM_SAVENOW 205
  371. #define IDM_ANSIGROUPS 206
  372. #define IDM_WINDOW 2
  373. #define IDM_CASCADE 301
  374. #define IDM_TILE 302
  375. #define IDM_ARRANGEICONS 303
  376. #define IDM_CHILDSTART 310
  377. #define IDM_HELP 3
  378. #define IDM_HELPINDEX 401
  379. #define IDM_HELPHELP 402
  380. #define IDM_ABOUT 403
  381. #define IDM_HELPSEARCH 404
  382. /* StringTable Defines */
  383. #define IDS_APPTITLE 1
  384. #define IDS_PMCLASS 2
  385. #define IDS_GROUPCLASS 3
  386. #define IDS_ITEMCLASS 4
  387. #define IDS_DATAFILE 5
  388. #define IDS_SETTINGS 7
  389. #define IDS_CONFIRMDELTITLE 40 /* Must be > 32 */
  390. #define IDS_CONFIRMDELITEMMSG 41
  391. #define IDS_CONFIRMDELGROUPMSG 42
  392. #define IDS_NOICONSTITLE 50
  393. #define IDS_NOICONSMSG 51
  394. #define IDS_BADPATHTITLE 52
  395. #define IDS_BADPATHMSG 53
  396. #define IDS_NETPATHTITLE 54
  397. #define IDS_REMOVEPATHTITLE 55
  398. #define IDS_PATHWARNING 56
  399. #define IDS_EXECERRTITLE 60
  400. #define IDS_UNKNOWNMSG 61
  401. #define IDS_NOMEMORYMSG 62
  402. #define IDS_FILENOTFOUNDMSG 63
  403. #define IDS_MANYOPENFILESMSG 64
  404. #define IDS_NOASSOCMSG 65
  405. #define IDS_MULTIPLEDSMSG 66
  406. #define IDS_ASSOCINCOMPLETE 67
  407. #define IDS_COPYDLGTITLE 70
  408. #define IDS_COPYDLGTITLE1 71
  409. #define IDS_GROUPS 72
  410. #define IDS_NOGRPFILE 73
  411. #define IDS_LOWMEM 74
  412. #define IDS_BADFILE 75
  413. #define IDS_CANTWRITEGRP 76
  414. #define IDS_GROUPFILEERR 77
  415. #define IDS_GRPISRO 78
  416. #define IDS_EXTRACTERROR 79
  417. #define IDS_EEGROUPRO 80
  418. #define IDS_CANTWRITEGRPS 81
  419. #define IDS_OOMEXITTITLE 110
  420. #define IDS_OOMEXITMSG 111
  421. #define IDS_GROUPRO 112
  422. #define IDS_CANTRENAMETITLE 113
  423. #define IDS_CANTRENAMEMSG 114
  424. #define IDS_TOOMANYITEMS 115
  425. #define IDS_OS2APPMSG 116
  426. #define IDS_NEWWINDOWSMSG 117
  427. #define IDS_PMODEONLYMSG 118
  428. #define IDS_ALREADYLOADED 119
  429. #define IDS_STARTUP 120
  430. #define IDS_PLUS 121
  431. #define IDS_GRPHASCHANGED 122
  432. #define IDS_NONE 123
  433. #define IDS_EXIT 124
  434. #define IDS_DUPHOTKEYTTL 125
  435. #define IDS_DUPHOTKEYMSG 126
  436. #define IDS_BROWSE 127
  437. #define IDS_NEWITEMPROGS 128
  438. #define IDS_PROPERTIESPROGS 129
  439. #define IDS_CHNGICONPROGS 130
  440. #define IDS_TOOMANYGROUPS 131
  441. #define IDS_ACCESSDENIED 133
  442. #define IDS_DDEFAIL 134
  443. #define IDS_LOWMEMONINIT 135
  444. #define IDS_PIFINIFILE 136
  445. #define IDS_PIFSECTION 137
  446. #define IDS_EXECSETUP 138
  447. #define IDS_WINHELPERR 139
  448. #define IDS_PIFADDINFO 140
  449. #define IDS_BADPATHMSG2 141
  450. #define IDS_BADPATHMSG3 142
  451. #define IDS_LOWMEMONEXIT 143
  452. #define IDS_WININIERR 144
  453. #define IDS_STARTUPERR 145
  454. #define IDS_CMDLINEERR 146
  455. #define IDS_ITEMINGROUP 147
  456. #define IDS_LOWMEMONEXTRACT 148
  457. #define IDS_DEFICONSFILE 149
  458. #define IDS_COMPRESSEDEXE 150
  459. #define IDS_INVALIDDLL 151
  460. #define IDS_SHAREERROR 152
  461. #define IDS_CANTWRITEGRPDISK 153
  462. #define IDS_COMMDLGLOADERR 154
  463. #define IDS_NOICONSMSG1 155
  464. #define IDS_NOGRPFILE2 156
  465. #define IDS_REGISTRYERROR 164
  466. #define IDS_ERRORDELETEGROUP 165
  467. #define IDS_LOGOFFERROR 166
  468. #define IDS_COMMONGRPSUFFIX 167
  469. #define IDS_COMMONGROUPPROP 168
  470. #define IDS_COMMONGROUPERR 169
  471. #define IDS_NOCOMMONGRPS 170
  472. #define IDS_NO_PERMISSION_SHUTDOWN 171
  473. #define IDS_SHUTDOWN_MESSAGE 172
  474. #define IDS_DEFAULTSTARTUP 173
  475. #define IDS_TOOMANYCOMMONGROUPS 174
  476. #define IDS_LOGOFF 175
  477. #define IDS_SHUTDOWN 176
  478. #define IDS_MSGBOXSTR1 177
  479. #define IDS_MSGBOXSTR2 178
  480. #define IDS_INSUFFICIENTQUOTA 179
  481. #define IDS_ANSIGROUPSMENU 180
  482. //#ifdef JAPAN
  483. //#define IDS_BADPORTPATHTITLE 1102
  484. //#define IDS_BADPORTPATHMSG 1103
  485. //#endif //JAPAN
  486. #include "pmdlg.h"
  487. #include "pmreg.h"
  488. #include "notify.h"
  489. /*--------------------------------------------------------------------------*/
  490. /* */
  491. /* Global Externs */
  492. /* */
  493. /*--------------------------------------------------------------------------*/
  494. extern BOOL UserIsAdmin;
  495. extern BOOL AccessToCommonGroups;
  496. extern BOOL bLoadIt;
  497. extern BOOL bMinOnRun;
  498. extern BOOL bArranging;
  499. extern BOOL bAutoArrange;
  500. extern BOOL bAutoArranging;
  501. extern BOOL bExitWindows;
  502. extern BOOL bSaveSettings;
  503. extern BOOL bIconTitleWrap;
  504. extern BOOL bScrolling;
  505. extern BOOL bLoadEvil;
  506. extern BOOL bMove;
  507. extern BOOL bInDDE;
  508. extern BOOL fInExec;
  509. extern BOOL fNoRun;
  510. extern BOOL fNoClose;
  511. extern BOOL fNoSave;
  512. extern BOOL fNoFileMenu;
  513. extern BOOL fLowMemErrYet;
  514. extern BOOL fExiting;
  515. extern BOOL fErrorOnExtract;
  516. extern BOOL bFrameSysMenu;
  517. extern TCHAR szNULL[];
  518. extern TCHAR szProgman[];
  519. extern TCHAR szTitle[];
  520. //
  521. // Program Manager's Settings keys
  522. //
  523. extern TCHAR szWindow[];
  524. extern TCHAR szOrder[];
  525. extern TCHAR szAnsiOrder[];
  526. extern TCHAR szStartup[];
  527. extern TCHAR szAutoArrange[];
  528. extern TCHAR szSaveSettings[];
  529. extern TCHAR szMinOnRun[];
  530. extern TCHAR szFocusOnCommonGroup[];
  531. extern TCHAR szMessage[MAXMESSAGELEN+1];
  532. extern TCHAR szNameField[MAXITEMPATHLEN+1];
  533. extern TCHAR szPathField[MAXITEMPATHLEN+1];
  534. extern TCHAR szIconPath[MAXITEMPATHLEN+1];
  535. extern TCHAR szDirField[];
  536. extern TCHAR szOriginalDirectory[];
  537. extern TCHAR szWindowsDirectory[];
  538. extern TCHAR szOOMExitMsg[64];
  539. extern TCHAR szOOMExitTitle[32];
  540. extern HANDLE hAccel;
  541. extern HINSTANCE hAppInstance;
  542. extern HANDLE hCommdlg;
  543. extern HICON hDlgIcon;
  544. extern HICON hItemIcon;
  545. extern HICON hProgmanIcon;
  546. extern HICON hGroupIcon;
  547. extern HICON hCommonGrpIcon;
  548. extern HICON hIconGlobal;
  549. extern HWND hwndProgman;
  550. extern HWND hwndMDIClient;
  551. extern HBRUSH hbrWorkspace;
  552. extern int nGroups;
  553. extern int dyBorder;
  554. extern int iDlgIconId;
  555. extern int iDlgIconIndex;
  556. extern int cxIcon;
  557. extern int cyIcon;
  558. extern int cxIconSpace;
  559. extern int cyIconSpace;
  560. extern int cxArrange;
  561. extern int cyArrange;
  562. extern int cxOffset;
  563. extern int cyOffset;
  564. extern WORD wPendingHotKey;
  565. extern DWORD dwDDEAppId;
  566. extern DWORD dwEditLevel;
  567. extern WORD wLockError;
  568. extern UINT uiActivateShellWindowMessage;
  569. extern UINT uiConsoleWindowMessage;
  570. extern UINT uiSaveSettingsMessage; // for User Profile Editor: upedit.exe
  571. extern PGROUP pFirstGroup;
  572. extern PGROUP pCurrentGroup;
  573. extern PGROUP pActiveGroup;
  574. extern PGROUP *pLastGroup;
  575. extern PGROUP pExecingGroup;
  576. extern PITEM pExecingItem;
  577. extern RECT rcDrag;
  578. extern HWND hwndDrag;
  579. extern WORD wNewSelection;
  580. extern HFONT hFontTitle;
  581. extern UINT uiHelpMessage; // stuff for help
  582. extern UINT uiBrowseMessage; // stuff for help
  583. extern WORD wMenuID;
  584. extern HANDLE hSaveMenuHandle; /*Save hMenu into one variable*/
  585. extern WORD wSaveFlags; /*Save flags into another*/
  586. extern HANDLE hSaveMenuHandleAroundSendMessage;/*Save hMenu into one variable*/
  587. extern WORD wSaveFlagsAroundSendMessage; /*Save flags into another*/
  588. extern WORD wSaveMenuIDAroundSendMessage;
  589. extern DWORD dwContext;
  590. extern HHOOK hhkMsgFilter;
  591. extern TCHAR szProgmanHelp[];
  592. extern BOOL bUseANSIGroups;
  593. extern PSECURITY_ATTRIBUTES pSecurityAttributes;
  594. extern PSECURITY_ATTRIBUTES pAdminSecAttr;
  595. extern BOOL bDisableDDE;