Leaked source code of windows server 2003
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.

506 lines
12 KiB

  1. /******************************************************************************
  2. Header File: New Project Wizard.H
  3. This file defines the various classes which make up the new project/ new
  4. mini-driver wizard. This is a key component of the studio, as it is the tool
  5. that kicks all the important conversions off for us.
  6. Copyright (c) 1997 by Microsoft Corporation. All Rights Reserved.
  7. A Pretty Penny Enterprises Production
  8. Change History:
  9. 02-03-1997 Bob_kjelgaard@Prodigy.Net Created the initial version.
  10. ******************************************************************************/
  11. #if !defined(NEW_PROJECT_WIZARD)
  12. #define NEW_PROJECT_WIZARD
  13. #if defined(LONG_NAMES)
  14. #include "Project Record.H"
  15. #else
  16. #include "ProjRec.H"
  17. #endif
  18. // An initial definition of the wizard class
  19. class CNewConvertWizard;
  20. /////////////////////////////////////////////////////////////////////////////
  21. // CFirstNewWizardPage dialog
  22. class CFirstNewWizardPage : public CPropertyPage {
  23. CNewConvertWizard& m_cnpwOwner;
  24. // Construction
  25. public:
  26. CFirstNewWizardPage(CNewConvertWizard &cnpwOwner);
  27. ~CFirstNewWizardPage();
  28. // Dialog Data
  29. //{{AFX_DATA(CFirstNewWizardPage)
  30. enum { IDD = IDD_FirstPageNewWizard };
  31. // NOTE - ClassWizard will add data members here.
  32. // DO NOT EDIT what you see in these blocks of generated code !
  33. //}}AFX_DATA
  34. // Overrides
  35. // ClassWizard generate virtual function overrides
  36. //{{AFX_VIRTUAL(CFirstNewWizardPage)
  37. public:
  38. virtual BOOL OnSetActive();
  39. virtual LRESULT OnWizardNext();
  40. protected:
  41. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  42. //}}AFX_VIRTUAL
  43. // Implementation
  44. protected:
  45. // Generated message map functions
  46. //{{AFX_MSG(CFirstNewWizardPage)
  47. //}}AFX_MSG
  48. DECLARE_MESSAGE_MAP()
  49. bool IsWrongNT4File(CString& cswrcfspec) ;
  50. };
  51. /////////////////////////////////////////////////////////////////////////////
  52. // CSelectTargets dialog
  53. class CSelectTargets : public CPropertyPage {
  54. CNewConvertWizard& m_cnpwOwner;
  55. // Construction
  56. public:
  57. CSelectTargets(CNewConvertWizard& cnpwOwner);
  58. ~CSelectTargets();
  59. // Dialog Data
  60. //{{AFX_DATA(CSelectTargets)
  61. enum { IDD = IDD_NPWSelectTargets };
  62. // NOTE - ClassWizard will add data members here.
  63. // DO NOT EDIT what you see in these blocks of generated code !
  64. //}}AFX_DATA
  65. // Overrides
  66. // ClassWizard generate virtual function overrides
  67. //{{AFX_VIRTUAL(CSelectTargets)
  68. public:
  69. virtual BOOL OnSetActive();
  70. virtual LRESULT OnWizardNext();
  71. protected:
  72. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  73. //}}AFX_VIRTUAL
  74. // Implementation
  75. protected:
  76. // Generated message map functions
  77. //{{AFX_MSG(CSelectTargets)
  78. virtual BOOL OnInitDialog();
  79. //}}AFX_MSG
  80. DECLARE_MESSAGE_MAP()
  81. };
  82. /////////////////////////////////////////////////////////////////////////////
  83. // CSelectDestinations dialog
  84. class CSelectDestinations : public CPropertyPage {
  85. CNewConvertWizard& m_cnpwOwner;
  86. void DoDirectoryBrowser(CString& csinitdir);
  87. BOOL BuildStructure();
  88. // Construction
  89. public:
  90. CSelectDestinations(CNewConvertWizard& cnpwOwner);
  91. ~CSelectDestinations();
  92. // Dialog Data
  93. //{{AFX_DATA(CSelectDestinations)
  94. enum { IDD = IDD_NPWSelectDest };
  95. CButton m_cbBrowseNT3x;
  96. CButton m_cbBrowseNT40;
  97. CButton m_cbBrowseW2000;
  98. CString m_csW2KDest;
  99. //}}AFX_DATA
  100. // Overrides
  101. // ClassWizard generate virtual function overrides
  102. //{{AFX_VIRTUAL(CSelectDestinations)
  103. public:
  104. virtual BOOL OnSetActive();
  105. virtual LRESULT OnWizardNext();
  106. virtual LRESULT OnWizardBack();
  107. protected:
  108. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  109. //}}AFX_VIRTUAL
  110. // Implementation
  111. protected:
  112. // Generated message map functions
  113. //{{AFX_MSG(CSelectDestinations)
  114. virtual BOOL OnInitDialog();
  115. afx_msg void OnBrowseNT40();
  116. afx_msg void OnBrowseW2000();
  117. afx_msg void OnBrowseNT3x();
  118. //}}AFX_MSG
  119. DECLARE_MESSAGE_MAP()
  120. };
  121. /////////////////////////////////////////////////////////////////////////////
  122. // CGPDSelection dialog
  123. class CGPDSelection : public CPropertyPage
  124. {
  125. CNewConvertWizard& m_cnpwOwner ;
  126. bool m_bBtnStateIsSelect ;
  127. // Construction
  128. public:
  129. CGPDSelection(CNewConvertWizard& cnpwOwner) ;
  130. ~CGPDSelection();
  131. // Dialog Data
  132. //{{AFX_DATA(CGPDSelection)
  133. enum { IDD = IDD_NPWGPDSelection };
  134. CButton m_cbGPDSelBtn;
  135. CEditControlEditBox m_cecebFileName;
  136. CEdit m_ceModelName;
  137. CEditControlListBox m_ceclbGPDInfo;
  138. //}}AFX_DATA
  139. // Overrides
  140. // ClassWizard generate virtual function overrides
  141. //{{AFX_VIRTUAL(CGPDSelection)
  142. public:
  143. virtual BOOL OnWizardFinish();
  144. virtual BOOL OnSetActive();
  145. virtual LRESULT OnWizardBack();
  146. protected:
  147. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  148. //}}AFX_VIRTUAL
  149. // Implementation
  150. protected:
  151. // Generated message map functions
  152. //{{AFX_MSG(CGPDSelection)
  153. afx_msg void OnGPDSelBtn();
  154. //}}AFX_MSG
  155. DECLARE_MESSAGE_MAP()
  156. bool GPDInfoSaveAndVerify(bool bverifydata) ;
  157. };
  158. /////////////////////////////////////////////////////////////////////////////
  159. // CRunUniTool dialog
  160. class CRunUniTool : public CPropertyPage {
  161. CNewConvertWizard& m_cnpwOwner;
  162. // Construction
  163. public:
  164. CRunUniTool(CNewConvertWizard& cnpwOwner);
  165. ~CRunUniTool();
  166. // Dialog Data
  167. //{{AFX_DATA(CRunUniTool)
  168. enum { IDD = IDD_RunUniTool };
  169. // NOTE - ClassWizard will add data members here.
  170. // DO NOT EDIT what you see in these blocks of generated code !
  171. //}}AFX_DATA
  172. // Overrides
  173. // ClassWizard generate virtual function overrides
  174. //{{AFX_VIRTUAL(CRunUniTool)
  175. public:
  176. virtual BOOL OnSetActive();
  177. virtual LRESULT OnWizardNext();
  178. protected:
  179. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  180. //}}AFX_VIRTUAL
  181. // Implementation
  182. protected:
  183. // Generated message map functions
  184. //{{AFX_MSG(CRunUniTool)
  185. afx_msg void OnRunUniTool();
  186. //}}AFX_MSG
  187. DECLARE_MESSAGE_MAP()
  188. };
  189. /////////////////////////////////////////////////////////////////////////////
  190. // CConvertFiles dialog
  191. class CConvertFiles : public CPropertyPage {
  192. CNewConvertWizard& m_cnpwOwner;
  193. // Construction
  194. public:
  195. CConvertFiles(CNewConvertWizard& cnpwOwner);
  196. ~CConvertFiles();
  197. // Dialog Data
  198. //{{AFX_DATA(CConvertFiles)
  199. enum { IDD = IDD_ConvertFiles };
  200. // NOTE - ClassWizard will add data members here.
  201. // DO NOT EDIT what you see in these blocks of generated code !
  202. //}}AFX_DATA
  203. // Overrides
  204. // ClassWizard generate virtual function overrides
  205. //{{AFX_VIRTUAL(CConvertFiles)
  206. public:
  207. virtual BOOL OnSetActive();
  208. virtual BOOL OnKillActive();
  209. protected:
  210. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  211. //}}AFX_VIRTUAL
  212. // Implementation
  213. protected:
  214. // Generated message map functions
  215. //{{AFX_MSG(CConvertFiles)
  216. afx_msg void OnConvertFiles();
  217. //}}AFX_MSG
  218. DECLARE_MESSAGE_MAP()
  219. };
  220. /////////////////////////////////////////////////////////////////////////////
  221. // CRunNTGPC dialog
  222. class CRunNTGPC : public CPropertyPage {
  223. CNewConvertWizard& m_cnpwOwner;
  224. // Construction
  225. public:
  226. CRunNTGPC(CNewConvertWizard& cnpwOwner);
  227. ~CRunNTGPC();
  228. // Dialog Data
  229. //{{AFX_DATA(CRunNTGPC)
  230. enum { IDD = IDD_GPCEditor };
  231. // NOTE - ClassWizard will add data members here.
  232. // DO NOT EDIT what you see in these blocks of generated code !
  233. //}}AFX_DATA
  234. // Overrides
  235. // ClassWizard generate virtual function overrides
  236. //{{AFX_VIRTUAL(CRunNTGPC)
  237. public:
  238. virtual BOOL OnSetActive();
  239. protected:
  240. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  241. //}}AFX_VIRTUAL
  242. // Implementation
  243. protected:
  244. // Generated message map functions
  245. //{{AFX_MSG(CRunNTGPC)
  246. afx_msg void OnRunNtGpcEdit();
  247. //}}AFX_MSG
  248. DECLARE_MESSAGE_MAP()
  249. };
  250. /////////////////////////////////////////////////////////////////////////////
  251. // CMapCodePages dialog
  252. class CMapCodePages : public CPropertyPage {
  253. CNewConvertWizard& m_cnpwOwner;
  254. // Construction
  255. public:
  256. CMapCodePages(CNewConvertWizard& cnpwOwner);
  257. ~CMapCodePages();
  258. // Dialog Data
  259. //{{AFX_DATA(CMapCodePages)
  260. enum { IDD = IDD_NPWCodePageSelection };
  261. CListBox m_clbMapping;
  262. //}}AFX_DATA
  263. // Overrides
  264. // ClassWizard generate virtual function overrides
  265. //{{AFX_VIRTUAL(CMapCodePages)
  266. public:
  267. virtual BOOL OnSetActive();
  268. virtual LRESULT OnWizardNext();
  269. protected:
  270. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  271. //}}AFX_VIRTUAL
  272. // Implementation
  273. protected:
  274. // Generated message map functions
  275. //{{AFX_MSG(CMapCodePages)
  276. afx_msg void OnChangeCodePage();
  277. //}}AFX_MSG
  278. DECLARE_MESSAGE_MAP()
  279. };
  280. /////////////////////////////////////////////////////////////////////////////
  281. // CDefaultCodePageSel dialog
  282. class CDefaultCodePageSel : public CPropertyPage
  283. {
  284. CNewConvertWizard& m_cnpwOwner ;
  285. bool bInitialized ;
  286. // Construction
  287. public:
  288. CDefaultCodePageSel(CNewConvertWizard& cnpwOwner) ;
  289. ~CDefaultCodePageSel();
  290. // Dialog Data
  291. //{{AFX_DATA(CDefaultCodePageSel)
  292. enum { IDD = IDD_NPWDefaultCodePageSel };
  293. CListBox m_clbCodePages;
  294. //}}AFX_DATA
  295. // Overrides
  296. // ClassWizard generate virtual function overrides
  297. //{{AFX_VIRTUAL(CDefaultCodePageSel)
  298. public:
  299. virtual BOOL OnSetActive();
  300. virtual LRESULT OnWizardNext();
  301. protected:
  302. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  303. //}}AFX_VIRTUAL
  304. // Implementation
  305. protected:
  306. // Generated message map functions
  307. //{{AFX_MSG(CDefaultCodePageSel)
  308. // NOTE: the ClassWizard will add member functions here
  309. //}}AFX_MSG
  310. DECLARE_MESSAGE_MAP()
  311. };
  312. /////////////////////////////////////////////////////////////////////////////
  313. // CNewConvertWizard
  314. class CNewConvertWizard : public CPropertySheet {
  315. CProjectRecord& m_cprThis; // The project being set up
  316. BOOL m_bFastConvert; // Normal/Custom conversion flag
  317. WORD m_eGPDConvert; // Flag for GPD conversion
  318. // Property pages contained in this wizard.
  319. CFirstNewWizardPage m_cfnwp;
  320. CSelectTargets m_cst;
  321. CSelectDestinations m_csd;
  322. CRunUniTool m_crut;
  323. CMapCodePages m_cmcp;
  324. CRunNTGPC m_crng;
  325. CConvertFiles m_ccf;
  326. CGPDSelection m_cgpds;
  327. CDefaultCodePageSel m_cdcps ;
  328. // Construction
  329. public:
  330. CNewConvertWizard(CProjectRecord& cprFor, CWnd* pParentWnd = NULL);
  331. // Attributes
  332. public:
  333. CProjectRecord& Project() { return m_cprThis; }
  334. BOOL FastConvert() const { return m_bFastConvert; }
  335. enum {Direct, Macro, CommonRC, CommonRCWithSpoolerNames};
  336. WORD GPDConvertFlag() const { return m_eGPDConvert; }
  337. // Operations
  338. public:
  339. void FastConvert(BOOL bFastConvert) {
  340. m_bFastConvert = bFastConvert;
  341. }
  342. void GPDConvertFlag(WORD wf) { m_eGPDConvert = wf; }
  343. // Overrides
  344. // ClassWizard generated virtual function overrides
  345. //{{AFX_VIRTUAL(CNewConvertWizard)
  346. //}}AFX_VIRTUAL
  347. // Implementation
  348. public:
  349. virtual ~CNewConvertWizard();
  350. // Generated message map functions
  351. protected:
  352. //{{AFX_MSG(CNewConvertWizard)
  353. afx_msg BOOL OnNcCreate(LPCREATESTRUCT lpCreateStruct);
  354. //}}AFX_MSG
  355. DECLARE_MESSAGE_MAP()
  356. };
  357. /////////////////////////////////////////////////////////////////////////////
  358. // CSelectCodePage dialog
  359. class CSelectCodePage : public CDialog {
  360. CString m_csName;
  361. unsigned m_uidCurrent;
  362. CDWordArray m_cdaPages;
  363. // Construction
  364. public:
  365. CSelectCodePage(CWnd* pParent, CString csName, unsigned uidPage);
  366. unsigned SelectedCodePage() const { return m_uidCurrent; }
  367. CString GetCodePageName() const;
  368. void Exclude(CDWordArray& cdaExclude);
  369. void LimitTo(CDWordArray& cdaExclusive);
  370. // Dialog Data
  371. //{{AFX_DATA(CSelectCodePage)
  372. enum { IDD = IDD_SelectPage };
  373. CListBox m_clbPages;
  374. //}}AFX_DATA
  375. // Overrides
  376. // ClassWizard generated virtual function overrides
  377. //{{AFX_VIRTUAL(CSelectCodePage)
  378. protected:
  379. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  380. //}}AFX_VIRTUAL
  381. // Implementation
  382. protected:
  383. // Generated message map functions
  384. //{{AFX_MSG(CSelectCodePage)
  385. virtual BOOL OnInitDialog();
  386. afx_msg void OnSelchangeSupportedPages();
  387. afx_msg void OnDblclkSupportedPages();
  388. //}}AFX_MSG
  389. DECLARE_MESSAGE_MAP()
  390. };
  391. #endif