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.

436 lines
9.9 KiB

  1. #if !defined(_CHOOSEFILENAMEPAGE_H)
  2. #define _CHOOSEFILENAMEPAGE_H
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // ChooseFileNamePage.h : header file
  7. //
  8. #include "Certificat.h"
  9. /////////////////////////////////////////////////////////////////////////////
  10. // CChooseFileNamePage dialog
  11. //class CCertificate;
  12. class CChooseFileNamePage : public CIISWizardPage
  13. {
  14. DECLARE_DYNCREATE(CChooseFileNamePage)
  15. // Construction
  16. public:
  17. CChooseFileNamePage( UINT id = 0,
  18. UINT defaultID = 0,
  19. UINT extID = 0,
  20. UINT filterID = 0,
  21. CString * pOutFileName = NULL,
  22. CString csAdditionalInfo = _T("")
  23. );
  24. ~CChooseFileNamePage();
  25. // Dialog Data
  26. //{{AFX_DATA(CChooseCAPage)
  27. CString m_FileName;
  28. //}}AFX_DATA
  29. BOOL m_DoReplaceFile;
  30. UINT m_id, m_defaultID;
  31. CString ext, filter;
  32. CString * m_pOutFileName;
  33. CString m_AdditionalInfo;
  34. // Overrides
  35. virtual void FileNameChanged()
  36. {
  37. }
  38. virtual BOOL IsReadFileDlg()
  39. {
  40. ASSERT(FALSE);
  41. return FALSE;
  42. }
  43. // ClassWizard generate virtual function overrides
  44. //{{AFX_VIRTUAL(CChooseCAPage)
  45. protected:
  46. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  47. public:
  48. virtual LRESULT OnWizardNext()
  49. {
  50. ASSERT(FALSE);
  51. return 1;
  52. }
  53. virtual LRESULT OnWizardBack();
  54. virtual BOOL OnSetActive();
  55. //}}AFX_VIRTUAL
  56. // Implementation
  57. protected:
  58. void GetDefaultFileName(CString& str);
  59. void Browse(CString& strPath, CString& strFile);
  60. LRESULT DoWizardNext(LRESULT id);
  61. // Generated message map functions
  62. //{{AFX_MSG(CChooseCAPage)
  63. afx_msg void OnBrowseBtn();
  64. virtual BOOL OnInitDialog();
  65. afx_msg void OnChangeFileName();
  66. //}}AFX_MSG
  67. DECLARE_MESSAGE_MAP()
  68. };
  69. class CChooseReadFileName : public CChooseFileNamePage
  70. {
  71. DECLARE_DYNCREATE(CChooseReadFileName)
  72. // Construction
  73. public:
  74. CChooseReadFileName( UINT id = 0,
  75. UINT defaultID = 0,
  76. UINT extID = 0,
  77. UINT filterID = 0,
  78. CString * pOutFileName = NULL,
  79. CString csAdditionalInfo = _T("")
  80. );
  81. ~CChooseReadFileName()
  82. {
  83. }
  84. // Overrides
  85. virtual void FileNameChanged()
  86. {
  87. }
  88. virtual BOOL IsReadFileDlg()
  89. {
  90. return TRUE;
  91. }
  92. // ClassWizard generate virtual function overrides
  93. //{{AFX_VIRTUAL(CChooseCAPage)
  94. protected:
  95. // virtual void DoDataExchange(CDataExchange* pDX)
  96. // {
  97. // CChooseFileNamePage::DoDataExchange(pDX);
  98. // }
  99. public:
  100. virtual LRESULT OnWizardNext();
  101. virtual LRESULT OnWizardBack() {return 1;}
  102. virtual BOOL OnSetActive()
  103. {
  104. return CChooseFileNamePage::OnSetActive();
  105. }
  106. //}}AFX_VIRTUAL
  107. // Implementation
  108. protected:
  109. // Generated message map functions
  110. //{{AFX_MSG(CChooseCAPage)
  111. afx_msg void OnBrowseBtn();
  112. virtual BOOL OnInitDialog();
  113. //}}AFX_MSG
  114. DECLARE_MESSAGE_MAP()
  115. };
  116. class CChooseWriteFileName : public CChooseFileNamePage
  117. {
  118. DECLARE_DYNCREATE(CChooseWriteFileName)
  119. // Construction
  120. public:
  121. CChooseWriteFileName(UINT id = 0,
  122. UINT defaultID = 0,
  123. UINT extID = 0,
  124. UINT filterID = 0,
  125. CString * pOutFileName = NULL,
  126. CString csAdditionalInfo = _T("")
  127. );
  128. ~CChooseWriteFileName() {}
  129. // Overrides
  130. virtual void FileNameChanged() {}
  131. virtual BOOL IsReadFileDlg()
  132. {
  133. return FALSE;
  134. }
  135. // ClassWizard generate virtual function overrides
  136. //{{AFX_VIRTUAL(CChooseCAPage)
  137. protected:
  138. // virtual void DoDataExchange(CDataExchange* pDX)
  139. // {
  140. // CChooseFileNamePage::DoDataExchange(pDX);
  141. // }
  142. public:
  143. virtual LRESULT OnWizardNext();
  144. virtual LRESULT OnWizardBack() {return 1;}
  145. virtual BOOL OnSetActive()
  146. {
  147. return CChooseFileNamePage::OnSetActive();
  148. }
  149. //}}AFX_VIRTUAL
  150. // Implementation
  151. protected:
  152. // Generated message map functions
  153. //{{AFX_MSG(CChooseCAPage)
  154. afx_msg void OnBrowseBtn();
  155. virtual BOOL OnInitDialog();
  156. //}}AFX_MSG
  157. DECLARE_MESSAGE_MAP()
  158. };
  159. class CChooseRespFile : public CChooseReadFileName
  160. {
  161. DECLARE_DYNCREATE(CChooseRespFile)
  162. // Construction
  163. public:
  164. CChooseRespFile(CCertificate * pCert = NULL);
  165. ~CChooseRespFile();
  166. enum
  167. {
  168. IDD_PAGE_PREV = IDD_PAGE_WIZ_PENDING_WHAT_TODO,
  169. IDD_PAGE_NEXT = IDD_PAGE_WIZ_INSTALL_RESP,
  170. };
  171. // Dialog Data
  172. //{{AFX_DATA(CChooseRespFile)
  173. enum { IDD = IDD_PAGE_WIZ_GETRESP_FILE };
  174. // NOTE - ClassWizard will add data members here.
  175. // DO NOT EDIT what you see in these blocks of generated code !
  176. //}}AFX_DATA
  177. CCertificate * m_pCert;
  178. // Overrides
  179. virtual void FileNameChanged();
  180. // ClassWizard generate virtual function overrides
  181. //{{AFX_VIRTUAL(CChooseRespFile)
  182. public:
  183. virtual LRESULT OnWizardNext();
  184. virtual LRESULT OnWizardBack();
  185. protected:
  186. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  187. //}}AFX_VIRTUAL
  188. // Implementation
  189. protected:
  190. // Generated message map functions
  191. //{{AFX_MSG(CChooseRespFile)
  192. afx_msg HBRUSH OnCtlColor(CDC * pDC, CWnd * pWnd, UINT nCtlColor);
  193. //}}AFX_MSG
  194. DECLARE_MESSAGE_MAP()
  195. };
  196. class CChooseReqFile : public CChooseWriteFileName
  197. {
  198. DECLARE_DYNCREATE(CChooseReqFile)
  199. // Construction
  200. public:
  201. CChooseReqFile(CCertificate * pCert = NULL);
  202. ~CChooseReqFile();
  203. enum
  204. {
  205. IDD_PAGE_PREV = IDD_PAGE_WIZ_GEO_INFO,
  206. IDD_PAGE_NEXT = IDD_PAGE_WIZ_REQUEST_DUMP
  207. };
  208. // Dialog Data
  209. //{{AFX_DATA(CChooseReqFile)
  210. enum { IDD = IDD_PAGE_WIZ_CHOOSE_FILENAME };
  211. // NOTE - ClassWizard will add data members here.
  212. // DO NOT EDIT what you see in these blocks of generated code !
  213. //}}AFX_DATA
  214. CCertificate * m_pCert;
  215. // Overrides
  216. // ClassWizard generate virtual function overrides
  217. //{{AFX_VIRTUAL(CChooseReqFile)
  218. public:
  219. virtual LRESULT OnWizardNext();
  220. virtual LRESULT OnWizardBack();
  221. protected:
  222. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  223. //}}AFX_VIRTUAL
  224. // Implementation
  225. protected:
  226. // Generated message map functions
  227. //{{AFX_MSG(CChooseReqFile)
  228. // NOTE: the ClassWizard will add member functions here
  229. //}}AFX_MSG
  230. DECLARE_MESSAGE_MAP()
  231. };
  232. class CChooseReqFileRenew : public CChooseWriteFileName
  233. {
  234. DECLARE_DYNCREATE(CChooseReqFileRenew)
  235. // Construction
  236. public:
  237. CChooseReqFileRenew(CCertificate * pCert = NULL);
  238. ~CChooseReqFileRenew();
  239. enum
  240. {
  241. IDD_PAGE_PREV = IDD_PAGE_WIZ_CHOOSE_CATYPE,
  242. IDD_PAGE_NEXT = IDD_PAGE_WIZ_REQUEST_DUMP_RENEW
  243. };
  244. // Dialog Data
  245. //{{AFX_DATA(CChooseReqFileRenew)
  246. enum { IDD = IDD_PAGE_WIZ_CHOOSE_FILENAME_RENEW };
  247. // NOTE - ClassWizard will add data members here.
  248. // DO NOT EDIT what you see in these blocks of generated code !
  249. //}}AFX_DATA
  250. CCertificate * m_pCert;
  251. // Overrides
  252. // ClassWizard generate virtual function overrides
  253. //{{AFX_VIRTUAL(CChooseReqFileRenew)
  254. public:
  255. virtual LRESULT OnWizardNext();
  256. virtual LRESULT OnWizardBack();
  257. protected:
  258. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  259. //}}AFX_VIRTUAL
  260. // Implementation
  261. protected:
  262. // Generated message map functions
  263. //{{AFX_MSG(CChooseReqFileRenew)
  264. // NOTE: the ClassWizard will add member functions here
  265. //}}AFX_MSG
  266. DECLARE_MESSAGE_MAP()
  267. };
  268. class CChooseKeyFile : public CChooseReadFileName
  269. {
  270. DECLARE_DYNCREATE(CChooseKeyFile)
  271. // Construction
  272. public:
  273. CChooseKeyFile(CCertificate * pCert = NULL);
  274. ~CChooseKeyFile();
  275. enum
  276. {
  277. IDD_PAGE_PREV = IDD_PAGE_WIZ_GET_WHAT,
  278. IDD_PAGE_NEXT = IDD_PAGE_WIZ_GET_PASSWORD,
  279. };
  280. // Dialog Data
  281. //{{AFX_DATA(CChooseKeyFile)
  282. enum { IDD = IDD_PAGE_WIZ_GETKEY_FILE };
  283. // NOTE - ClassWizard will add data members here.
  284. // DO NOT EDIT what you see in these blocks of generated code !
  285. //}}AFX_DATA
  286. CCertificate * m_pCert;
  287. // Overrides
  288. // ClassWizard generate virtual function overrides
  289. //{{AFX_VIRTUAL(CChooseKeyFile)
  290. public:
  291. virtual LRESULT OnWizardNext();
  292. virtual LRESULT OnWizardBack();
  293. protected:
  294. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  295. //}}AFX_VIRTUAL
  296. // Implementation
  297. protected:
  298. // Generated message map functions
  299. //{{AFX_MSG(CChooseKeyFile)
  300. // NOTE: the ClassWizard will add member functions here
  301. //}}AFX_MSG
  302. DECLARE_MESSAGE_MAP()
  303. };
  304. class CChooseImportPFXFile : public CChooseReadFileName
  305. {
  306. DECLARE_DYNCREATE(CChooseImportPFXFile)
  307. // Construction
  308. public:
  309. CChooseImportPFXFile(CCertificate * pCert = NULL);
  310. ~CChooseImportPFXFile();
  311. enum
  312. {
  313. IDD_PAGE_PREV = IDD_PAGE_WIZ_GET_WHAT,
  314. IDD_PAGE_NEXT = IDD_PAGE_WIZ_GET_IMPORT_PFX_PASSWORD,
  315. };
  316. // Dialog Data
  317. //{{AFX_DATA(CChooseImportPFXFile)
  318. enum { IDD = IDD_PAGE_WIZ_GET_IMPORT_PFX_FILE };
  319. BOOL m_MarkAsExportable;
  320. //}}AFX_DATA
  321. CCertificate * m_pCert;
  322. // Overrides
  323. // ClassWizard generate virtual function overrides
  324. //{{AFX_VIRTUAL(CChooseImportPFXFile)
  325. public:
  326. virtual LRESULT OnWizardNext();
  327. virtual LRESULT OnWizardBack();
  328. protected:
  329. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  330. //}}AFX_VIRTUAL
  331. // Implementation
  332. protected:
  333. // Generated message map functions
  334. //{{AFX_MSG(CChooseImportPFXFile)
  335. // NOTE: the ClassWizard will add member functions here
  336. afx_msg void OnExportable();
  337. //}}AFX_MSG
  338. DECLARE_MESSAGE_MAP()
  339. };
  340. class CChooseExportPFXFile : public CChooseWriteFileName
  341. {
  342. DECLARE_DYNCREATE(CChooseExportPFXFile)
  343. // Construction
  344. public:
  345. CChooseExportPFXFile(CCertificate * pCert = NULL);
  346. ~CChooseExportPFXFile();
  347. enum
  348. {
  349. IDD_PAGE_PREV = IDD_PAGE_WIZ_MANAGE_CERT,
  350. IDD_PAGE_NEXT = IDD_PAGE_WIZ_GET_EXPORT_PFX_PASSWORD,
  351. };
  352. // Dialog Data
  353. //{{AFX_DATA(CChooseExportPFXFile)
  354. enum { IDD = IDD_PAGE_WIZ_GET_EXPORT_PFX_FILE };
  355. // NOTE - ClassWizard will add data members here.
  356. // DO NOT EDIT what you see in these blocks of generated code !
  357. //}}AFX_DATA
  358. CCertificate * m_pCert;
  359. // Overrides
  360. // ClassWizard generate virtual function overrides
  361. //{{AFX_VIRTUAL(CChooseExportPFXFile)
  362. public:
  363. virtual LRESULT OnWizardNext();
  364. virtual LRESULT OnWizardBack();
  365. protected:
  366. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  367. //}}AFX_VIRTUAL
  368. // Implementation
  369. protected:
  370. // Generated message map functions
  371. //{{AFX_MSG(CChooseExportPFXFile)
  372. // NOTE: the ClassWizard will add member functions here
  373. //}}AFX_MSG
  374. DECLARE_MESSAGE_MAP()
  375. };
  376. //{{AFX_INSERT_LOCATION}}
  377. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  378. #endif // !defined(_CHOOSEFILENAMEPAGE_H)