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.

1118 lines
30 KiB

  1. #if !defined(AFX_INFWIZRD_H__D9592262_711B_11D2_ABFD_00C04FA30E4A__INCLUDED_)
  2. #define AFX_INFWIZRD_H__D9592262_711B_11D2_ABFD_00C04FA30E4A__INCLUDED_
  3. #if _MSC_VER >= 1000
  4. #pragma once
  5. #endif // _MSC_VER >= 1000
  6. // INFWizrd.h : header file
  7. //
  8. class CINFWizard ;
  9. #define MAX_DEVNODE_NAME_ROOT 20
  10. /////////////////////////////////////////////////////////////////////////////
  11. // CCompatID class used to generate pseudo PNP ID for each model
  12. class CCompatID
  13. {
  14. public:
  15. void GenerateID( CString &csCompID );
  16. CCompatID( CString csMfg, CString csModel );
  17. virtual ~CCompatID();
  18. protected:
  19. USHORT GetCheckSum( CString csValue );
  20. void TransString( CString &csInput );
  21. CString m_csModel;
  22. CString m_csMfg;
  23. };
  24. /////////////////////////////////////////////////////////////////////////////
  25. // CINFWizWelcome dialog
  26. class CINFWizWelcome : public CPropertyPage
  27. {
  28. DECLARE_DYNCREATE(CINFWizWelcome)
  29. // Construction
  30. public:
  31. CINFWizWelcome();
  32. ~CINFWizWelcome();
  33. // Dialog Data
  34. //{{AFX_DATA(CINFWizWelcome)
  35. enum { IDD = IDD_INFW_Welcome };
  36. // NOTE - ClassWizard will add data members here.
  37. // DO NOT EDIT what you see in these blocks of generated code !
  38. //}}AFX_DATA
  39. // Overrides
  40. // ClassWizard generate virtual function overrides
  41. //{{AFX_VIRTUAL(CINFWizWelcome)
  42. public:
  43. virtual BOOL OnSetActive();
  44. protected:
  45. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  46. //}}AFX_VIRTUAL
  47. // Implementation
  48. protected:
  49. // Generated message map functions
  50. //{{AFX_MSG(CINFWizWelcome)
  51. // NOTE: the ClassWizard will add member functions here
  52. //}}AFX_MSG
  53. DECLARE_MESSAGE_MAP()
  54. public:
  55. CINFWizard* m_pciwParent ;
  56. bool m_bInitialized ; // True iff page has been initialized
  57. };
  58. /////////////////////////////////////////////////////////////////////////////
  59. // CINFWizModels dialog
  60. class CINFWizModels : public CPropertyPage
  61. {
  62. DECLARE_DYNCREATE(CINFWizModels)
  63. // Construction
  64. public:
  65. CINFWizModels();
  66. ~CINFWizModels();
  67. // Dialog Data
  68. //{{AFX_DATA(CINFWizModels)
  69. enum { IDD = IDD_INFW_ChooseModels };
  70. CFullEditListCtrl m_cfelcModels;
  71. //}}AFX_DATA
  72. // Overrides
  73. // ClassWizard generate virtual function overrides
  74. //{{AFX_VIRTUAL(CINFWizModels)
  75. public:
  76. virtual BOOL OnSetActive();
  77. virtual LRESULT OnWizardNext();
  78. protected:
  79. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  80. //}}AFX_VIRTUAL
  81. // Implementation
  82. protected:
  83. // Generated message map functions
  84. //{{AFX_MSG(CINFWizModels)
  85. // NOTE: the ClassWizard will add member functions here
  86. //}}AFX_MSG
  87. DECLARE_MESSAGE_MAP()
  88. public:
  89. CINFWizard* m_pciwParent ;
  90. bool m_bInitialized ; // True iff page has been initialized
  91. bool m_bReInitWData ; // True iff page should be reinitialized
  92. // with the existing data
  93. CStringArray m_csaModels ; // Model names
  94. CStringArray m_csaModelsLast ; // Model names (copy of last ones sel'd)
  95. CStringArray m_csaInclude ; // Include strings for models
  96. unsigned m_uNumModels ; // Number of models in the project
  97. unsigned m_uNumModelsSel ; // Number of models selected for INF
  98. CString m_csToggleStr ; // String used in toggle column
  99. bool m_bSelChanged ; // True iff initial selections may have // changed.
  100. };
  101. /////////////////////////////////////////////////////////////////////////////
  102. // CINFWizGetPnPIDs dialog
  103. class CINFWizGetPnPIDs : public CPropertyPage
  104. {
  105. DECLARE_DYNCREATE(CINFWizGetPnPIDs)
  106. // Construction
  107. public:
  108. CINFWizGetPnPIDs();
  109. ~CINFWizGetPnPIDs();
  110. // Dialog Data
  111. //{{AFX_DATA(CINFWizGetPnPIDs)
  112. enum { IDD = IDD_INFW_ModelPnPIDS };
  113. CFullEditListCtrl m_felcModelIDs;
  114. //}}AFX_DATA
  115. // Overrides
  116. // ClassWizard generate virtual function overrides
  117. //{{AFX_VIRTUAL(CINFWizGetPnPIDs)
  118. public:
  119. virtual BOOL OnSetActive();
  120. virtual LRESULT OnWizardBack();
  121. virtual LRESULT OnWizardNext();
  122. protected:
  123. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  124. //}}AFX_VIRTUAL
  125. // Implementation
  126. protected:
  127. // Generated message map functions
  128. //{{AFX_MSG(CINFWizGetPnPIDs)
  129. // NOTE: the ClassWizard will add member functions here
  130. //}}AFX_MSG
  131. DECLARE_MESSAGE_MAP()
  132. public:
  133. CINFWizard* m_pciwParent ;
  134. bool m_bInitialized ; // True iff page has been initialized
  135. bool m_bReInitWData ; // True iff page should be reinitialized
  136. // with the existing data
  137. bool m_bSelChanged ; // True iff initial selections may have
  138. // changed.
  139. CStringArray m_csaModels ; // Selected model names
  140. CStringArray m_csaModelIDs ; // PnP IDs for the selected models.
  141. // Operations
  142. public:
  143. void InitModelsIDListCtl() ;
  144. };
  145. /////////////////////////////////////////////////////////////////////////////
  146. // CINFWizBiDi dialog
  147. class CINFWizBiDi : public CPropertyPage
  148. {
  149. DECLARE_DYNCREATE(CINFWizBiDi)
  150. // Construction
  151. public:
  152. CINFWizBiDi();
  153. ~CINFWizBiDi();
  154. // Dialog Data
  155. //{{AFX_DATA(CINFWizBiDi)
  156. enum { IDD = IDD_INFW_BiDi };
  157. CFullEditListCtrl m_cfelcBiDi;
  158. //}}AFX_DATA
  159. // Overrides
  160. // ClassWizard generate virtual function overrides
  161. //{{AFX_VIRTUAL(CINFWizBiDi)
  162. public:
  163. virtual BOOL OnSetActive();
  164. virtual LRESULT OnWizardNext();
  165. virtual LRESULT OnWizardBack();
  166. protected:
  167. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  168. //}}AFX_VIRTUAL
  169. // Operations
  170. public:
  171. void ModelChangeFixups(unsigned unummodelssel, CStringArray& csamodels,
  172. CStringArray& csamodelslast) ;
  173. // Implementation
  174. protected:
  175. // Generated message map functions
  176. //{{AFX_MSG(CINFWizBiDi)
  177. // NOTE: the ClassWizard will add member functions here
  178. //}}AFX_MSG
  179. DECLARE_MESSAGE_MAP()
  180. public:
  181. CINFWizard* m_pciwParent ;
  182. CString m_csToggleStr ; // String used in toggle column
  183. bool m_bInitialized ; // True iff page has been initialized
  184. bool m_bReInitWData ; // True iff page should be reinitialized
  185. // with the existing data
  186. CUIntArray m_cuaBiDiFlags ; // Per model BIDI flags kept here
  187. bool m_bSelChanged ; // True iff initial selections may have
  188. // changed.
  189. };
  190. /////////////////////////////////////////////////////////////////////////////
  191. // CINFWizICMProfiles dialog
  192. class CINFWizICMProfiles : public CPropertyPage
  193. {
  194. DECLARE_DYNCREATE(CINFWizICMProfiles)
  195. // Construction
  196. public:
  197. CINFWizICMProfiles();
  198. ~CINFWizICMProfiles();
  199. // Dialog Data
  200. //{{AFX_DATA(CINFWizICMProfiles)
  201. enum { IDD = IDD_INFW_ICMProfiles };
  202. CFullEditListCtrl m_cfelcICMFSpecs;
  203. CListBox m_clbModels;
  204. CButton m_cbBrowse;
  205. //}}AFX_DATA
  206. // Overrides
  207. // ClassWizard generate virtual function overrides
  208. //{{AFX_VIRTUAL(CINFWizICMProfiles)
  209. public:
  210. virtual BOOL OnSetActive();
  211. virtual LRESULT OnWizardNext();
  212. virtual LRESULT OnWizardBack();
  213. protected:
  214. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  215. //}}AFX_VIRTUAL
  216. // Operations
  217. public:
  218. void ModelChangeFixups(unsigned unummodelssel, CStringArray& csamodels,
  219. CStringArray& csamodelslast) ;
  220. // Implementation
  221. protected:
  222. // Generated message map functions
  223. //{{AFX_MSG(CINFWizICMProfiles)
  224. afx_msg void OnBrowseBtn();
  225. afx_msg void OnSelchangeModelsLst();
  226. //}}AFX_MSG
  227. DECLARE_MESSAGE_MAP()
  228. public:
  229. CINFWizard* m_pciwParent ;
  230. bool m_bInitialized ; // True iff page has been initialized
  231. bool m_bReInitWData ; // True iff page should be reinitialized
  232. // with the existing data
  233. int m_nCurModelIdx ; // Index of model selected in list box
  234. // Array of CStringArray pointers. One for each selected model. Each
  235. // CStringArray will contain the ICM profile filespecs for a model.
  236. CObArray m_coaProfileArrays ;
  237. bool m_bSelChanged ; // True iff initial selections may have
  238. // changed.
  239. };
  240. /////////////////////////////////////////////////////////////////////////////
  241. // CINFWizIncludeFiles dialog
  242. class CINFWizIncludeFiles : public CPropertyPage
  243. {
  244. DECLARE_DYNCREATE(CINFWizIncludeFiles)
  245. // Construction
  246. public:
  247. CINFWizIncludeFiles();
  248. ~CINFWizIncludeFiles();
  249. // Dialog Data
  250. //{{AFX_DATA(CINFWizIncludeFiles)
  251. enum { IDD = IDD_INFW_IncludeFiles };
  252. CListBox m_clbModels;
  253. CEdit m_ceIncludeFile;
  254. //}}AFX_DATA
  255. // Overrides
  256. // ClassWizard generate virtual function overrides
  257. //{{AFX_VIRTUAL(CINFWizIncludeFiles)
  258. public:
  259. virtual LRESULT OnWizardBack();
  260. virtual LRESULT OnWizardNext();
  261. virtual BOOL OnSetActive();
  262. protected:
  263. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  264. //}}AFX_VIRTUAL
  265. // Implementation
  266. protected:
  267. // Generated message map functions
  268. //{{AFX_MSG(CINFWizIncludeFiles)
  269. afx_msg void OnSelchangeModelsLst();
  270. //}}AFX_MSG
  271. DECLARE_MESSAGE_MAP()
  272. public:
  273. CINFWizard* m_pciwParent ;
  274. bool m_bInitialized ; // True iff page has been initialized
  275. bool m_bReInitWData ; // True iff page should be reinitialized
  276. // with the existing data
  277. bool m_bSelChanged ; // True iff initial selections may have
  278. // changed.
  279. CStringArray m_csaModels ; // Selected models
  280. CStringArray m_csaIncFiles ; // Include files for each model
  281. int m_nCurModelIdx ; // Index of model selected in list box
  282. };
  283. /////////////////////////////////////////////////////////////////////////////
  284. // CINFWizInstallSections dialog
  285. #define NUMINSTSECFLAGS 5 // Number of per model, install section flags
  286. #define ISF_UNI 0 // Install section flag indexes
  287. #define ISF_UNIBIDI 1
  288. #define ISF_PSCR 2
  289. #define ISF_TTF 3
  290. #define ISF_OTHER 4
  291. class CINFWizInstallSections : public CPropertyPage
  292. {
  293. DECLARE_DYNCREATE(CINFWizInstallSections)
  294. // Construction
  295. public:
  296. CINFWizInstallSections();
  297. ~CINFWizInstallSections();
  298. // Dialog Data
  299. //{{AFX_DATA(CINFWizInstallSections)
  300. enum { IDD = IDD_INFW_InstallSections };
  301. CListBox m_clbModels;
  302. CString m_csOtherSections;
  303. BOOL m_bOther;
  304. BOOL m_bPscript;
  305. BOOL m_bTtfsub;
  306. BOOL m_bUnidrvBidi;
  307. BOOL m_bUnidrv;
  308. //}}AFX_DATA
  309. // Overrides
  310. // ClassWizard generate virtual function overrides
  311. //{{AFX_VIRTUAL(CINFWizInstallSections)
  312. public:
  313. virtual BOOL OnSetActive();
  314. virtual LRESULT OnWizardBack();
  315. virtual LRESULT OnWizardNext();
  316. protected:
  317. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  318. //}}AFX_VIRTUAL
  319. // Implementation
  320. protected:
  321. // Generated message map functions
  322. //{{AFX_MSG(CINFWizInstallSections)
  323. afx_msg void OnSelchangeModelsLst();
  324. afx_msg void OnOtherChk();
  325. afx_msg void OnPscriptChk();
  326. afx_msg void OnTtfsubChk();
  327. afx_msg void OnUnidrvBidiChk();
  328. afx_msg void OnUnidrvChk();
  329. //}}AFX_MSG
  330. DECLARE_MESSAGE_MAP()
  331. public:
  332. CINFWizard* m_pciwParent ;
  333. bool m_bInitialized ; // True iff page has been initialized
  334. bool m_bReInitWData ; // True iff page should be reinitialized
  335. // with the existing data
  336. bool m_bSelChanged ; // True iff initial selections may have
  337. // changed.
  338. CStringArray m_csaModels ; // Selected models
  339. CObArray m_coaStdInstSecs ; // Standard install section info
  340. CStringArray m_csaOtherInstSecs ;// Other install sections
  341. int m_nCurModelIdx ; // Index of model selected in list box
  342. // Operations
  343. public:
  344. void AddModelFlags(int nidx) ;
  345. int InitPageControls() ;
  346. void BiDiDataChanged() ;
  347. } ;
  348. #define NUMDATASECFLAGS 4 // Number of per model, data section flags
  349. #define IDF_UNI 0 // Data section flag indexes
  350. #define IDF_UNIBIDI 1
  351. #define IDF_PSCR 2
  352. #define IDF_OTHER 3
  353. /////////////////////////////////////////////////////////////////////////////
  354. // CINFWizDataSections dialog
  355. class CINFWizDataSections : public CPropertyPage
  356. {
  357. DECLARE_DYNCREATE(CINFWizDataSections)
  358. // Construction
  359. public:
  360. CINFWizDataSections();
  361. ~CINFWizDataSections();
  362. // Dialog Data
  363. //{{AFX_DATA(CINFWizDataSections)
  364. enum { IDD = IDD_INFW_DataSections };
  365. CListBox m_clbModels;
  366. CString m_csOtherSections;
  367. BOOL m_bOther;
  368. BOOL m_bPscript;
  369. BOOL m_bUnidrvBidi;
  370. BOOL m_bUnidrv;
  371. //}}AFX_DATA
  372. // Overrides
  373. // ClassWizard generate virtual function overrides
  374. //{{AFX_VIRTUAL(CINFWizDataSections)
  375. public:
  376. virtual BOOL OnSetActive();
  377. virtual LRESULT OnWizardBack();
  378. virtual LRESULT OnWizardNext();
  379. protected:
  380. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  381. //}}AFX_VIRTUAL
  382. // Implementation
  383. protected:
  384. // Generated message map functions
  385. //{{AFX_MSG(CINFWizDataSections)
  386. afx_msg void OnSelchangeModelsLst();
  387. afx_msg void OnOtherChk();
  388. afx_msg void OnPscriptChk();
  389. afx_msg void OnUnidrvBidiChk();
  390. afx_msg void OnUnidrvChk();
  391. //}}AFX_MSG
  392. DECLARE_MESSAGE_MAP()
  393. public:
  394. CINFWizard* m_pciwParent ;
  395. bool m_bInitialized ; // True iff page has been initialized
  396. bool m_bReInitWData ; // True iff page should be reinitialized
  397. // with the existing data
  398. bool m_bSelChanged ; // True iff initial selections may have
  399. // changed.
  400. CStringArray m_csaModels ; // Selected models
  401. CObArray m_coaStdDataSecs ; // Standard data section info
  402. CStringArray m_csaOtherDataSecs ;// Other data sections
  403. int m_nCurModelIdx ; // Index of model selected in list box
  404. // Operations
  405. public:
  406. void AddModelFlags(int nidx) ;
  407. int InitPageControls() ;
  408. void BiDiDataChanged() ;
  409. };
  410. /////////////////////////////////////////////////////////////////////////////
  411. // CINFWizExtraFiles dialog
  412. class CINFWizExtraFiles : public CPropertyPage
  413. {
  414. DECLARE_DYNCREATE(CINFWizExtraFiles)
  415. // Construction
  416. public:
  417. CINFWizExtraFiles();
  418. ~CINFWizExtraFiles();
  419. // Dialog Data
  420. //{{AFX_DATA(CINFWizExtraFiles)
  421. enum { IDD = IDD_INFW_ExtraFiles };
  422. CFullEditListCtrl m_cfelcFSpecsLst;
  423. CListBox m_clbModels;
  424. CButton m_cbBrowse;
  425. //}}AFX_DATA
  426. // Overrides
  427. // ClassWizard generate virtual function overrides
  428. //{{AFX_VIRTUAL(CINFWizExtraFiles)
  429. public:
  430. virtual BOOL OnSetActive();
  431. virtual LRESULT OnWizardNext();
  432. virtual LRESULT OnWizardBack();
  433. protected:
  434. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  435. //}}AFX_VIRTUAL
  436. // Operations
  437. public:
  438. void ModelChangeFixups(unsigned unummodelssel, CStringArray& csamodels,
  439. CStringArray& csamodelslast) ;
  440. // Implementation
  441. protected:
  442. // Generated message map functions
  443. //{{AFX_MSG(CINFWizExtraFiles)
  444. afx_msg void OnSelchangeModelLst();
  445. afx_msg void OnBrowsBtn();
  446. //}}AFX_MSG
  447. DECLARE_MESSAGE_MAP()
  448. public:
  449. CINFWizard* m_pciwParent ;
  450. bool m_bInitialized ; // True iff page has been initialized
  451. bool m_bReInitWData ; // True iff page should be reinitialized
  452. // with the existing data
  453. int m_nCurModelIdx ; // Index of model selected in list box
  454. // Array of CStringArray pointers. One for each selected model. Each
  455. // CStringArray will contain the extra filespecs for a model.
  456. CObArray m_coaExtraFSArrays ;
  457. bool m_bSelChanged ; // True iff initial selections may have
  458. // changed.
  459. };
  460. /////////////////////////////////////////////////////////////////////////////
  461. // CINFWizMfgName dialog
  462. class CINFWizMfgName : public CPropertyPage
  463. {
  464. DECLARE_DYNCREATE(CINFWizMfgName)
  465. // Construction
  466. public:
  467. CINFWizMfgName();
  468. ~CINFWizMfgName();
  469. // Dialog Data
  470. //{{AFX_DATA(CINFWizMfgName)
  471. enum { IDD = IDD_INFW_MfgName };
  472. CEdit m_ceMfgAbbrev;
  473. CEdit m_ceMfgName;
  474. CString m_csMfgName;
  475. CString m_csMfgAbbrev;
  476. //}}AFX_DATA
  477. // Overrides
  478. // ClassWizard generate virtual function overrides
  479. //{{AFX_VIRTUAL(CINFWizMfgName)
  480. public:
  481. virtual BOOL OnSetActive();
  482. virtual LRESULT OnWizardNext();
  483. virtual LRESULT OnWizardBack();
  484. protected:
  485. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  486. //}}AFX_VIRTUAL
  487. // Implementation
  488. protected:
  489. // Generated message map functions
  490. //{{AFX_MSG(CINFWizMfgName)
  491. // NOTE: the ClassWizard will add member functions here
  492. //}}AFX_MSG
  493. DECLARE_MESSAGE_MAP()
  494. public:
  495. CINFWizard* m_pciwParent ;
  496. bool m_bInitialized ; // True iff page has been initialized
  497. bool m_bReInitWData ; // True iff page should be reinitialized
  498. // with the existing data
  499. };
  500. /////////////////////////////////////////////////////////////////////////////
  501. // CINFWizNonStdElts dialog
  502. class CINFWizNonStdElts : public CPropertyPage
  503. {
  504. DECLARE_DYNCREATE(CINFWizNonStdElts)
  505. // Construction
  506. public:
  507. CINFWizNonStdElts();
  508. ~CINFWizNonStdElts();
  509. // Dialog Data
  510. //{{AFX_DATA(CINFWizNonStdElts)
  511. enum { IDD = IDD_INFW_NonStdElements };
  512. CButton m_ceNewSection;
  513. CFullEditListCtrl m_felcKeyValueLst;
  514. CListBox m_clbSections;
  515. //}}AFX_DATA
  516. // Overrides
  517. // ClassWizard generate virtual function overrides
  518. //{{AFX_VIRTUAL(CINFWizNonStdElts)
  519. public:
  520. virtual BOOL OnSetActive();
  521. virtual LRESULT OnWizardNext();
  522. virtual LRESULT OnWizardBack();
  523. protected:
  524. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  525. //}}AFX_VIRTUAL
  526. // Implementation
  527. protected:
  528. // Generated message map functions
  529. //{{AFX_MSG(CINFWizNonStdElts)
  530. afx_msg void OnSelchangeSectionLst();
  531. afx_msg void OnNewSectionBtn();
  532. //}}AFX_MSG
  533. DECLARE_MESSAGE_MAP()
  534. public:
  535. CINFWizard* m_pciwParent ;
  536. bool m_bInitialized ; // True iff page has been initialized
  537. bool m_bReInitWData ; // True iff page should be reinitialized
  538. // with the existing data
  539. int m_nCurSectionIdx ; // Index of section selected in list box
  540. CStringArray m_csaSections ; // Array of INF file sections
  541. CUIntArray m_cuaSecUsed ; // An element is true iff section used
  542. // Array of CStringArray pointers. One for each section. Each CStringArray
  543. // will contain the extra filespecs for a model.
  544. CObArray m_coaSectionArrays ;
  545. bool m_bNewSectionAdded ;// True iff a new section was added
  546. };
  547. /////////////////////////////////////////////////////////////////////////////
  548. // CINFWizNonStdModelSecs dialog
  549. class CINFWizNonStdModelSecs : public CPropertyPage
  550. {
  551. DECLARE_DYNCREATE(CINFWizNonStdModelSecs)
  552. // Construction
  553. public:
  554. CINFWizNonStdModelSecs();
  555. ~CINFWizNonStdModelSecs();
  556. // Dialog Data
  557. //{{AFX_DATA(CINFWizNonStdModelSecs)
  558. enum { IDD = IDD_INFW_NonStdModelSecs };
  559. CFullEditListCtrl m_cfelcModelsLst;
  560. CListBox m_clbSectionsLst;
  561. //}}AFX_DATA
  562. // Overrides
  563. // ClassWizard generate virtual function overrides
  564. //{{AFX_VIRTUAL(CINFWizNonStdModelSecs)
  565. public:
  566. virtual BOOL OnSetActive();
  567. virtual LRESULT OnWizardNext();
  568. virtual LRESULT OnWizardBack();
  569. protected:
  570. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  571. //}}AFX_VIRTUAL
  572. // Implementation
  573. protected:
  574. // Generated message map functions
  575. //{{AFX_MSG(CINFWizNonStdModelSecs)
  576. afx_msg void OnSelchangeSectionLst();
  577. //}}AFX_MSG
  578. DECLARE_MESSAGE_MAP()
  579. public:
  580. CINFWizard* m_pciwParent ;
  581. bool m_bInitialized ; // True iff page has been initialized
  582. bool m_bSelChanged ; // True iff initial selections may have
  583. bool m_bReInitWData ; // True iff page should be reinitialized
  584. // with the existing data
  585. int m_nCurSectionIdx ; // Index of section selected in list box
  586. CStringArray m_csaModels ; // Array of selected models
  587. CStringArray m_csaSections ; // Array of INF file sections
  588. CObArray m_coaModelsNeedingSecs ;// Arrays of models needing sections
  589. CString m_csToggleStr ; // String used in toggle column
  590. // Operations
  591. public:
  592. void SaveSectionModelInfo() ;
  593. void NonStdSecsChanged() ;
  594. void UpdateSectionData() ;
  595. void InitModelsListCtl() ;
  596. };
  597. /////////////////////////////////////////////////////////////////////////////
  598. // CINFWizSummary dialog
  599. class CINFWizSummary : public CPropertyPage
  600. {
  601. DECLARE_DYNCREATE(CINFWizSummary)
  602. // Construction
  603. public:
  604. CINFWizSummary();
  605. ~CINFWizSummary();
  606. // Dialog Data
  607. //{{AFX_DATA(CINFWizSummary)
  608. enum { IDD = IDD_INFW_Summary };
  609. CEdit m_ceSummary;
  610. //}}AFX_DATA
  611. // Overrides
  612. // ClassWizard generate virtual function overrides
  613. //{{AFX_VIRTUAL(CINFWizSummary)
  614. public:
  615. virtual BOOL OnSetActive();
  616. protected:
  617. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  618. //}}AFX_VIRTUAL
  619. // Implementation
  620. protected:
  621. // Generated message map functions
  622. //{{AFX_MSG(CINFWizSummary)
  623. // NOTE: the ClassWizard will add member functions here
  624. //}}AFX_MSG
  625. DECLARE_MESSAGE_MAP()
  626. public:
  627. CINFWizard* m_pciwParent ;
  628. bool m_bInitialized ; // True iff page has been initialized
  629. bool m_bReInitWData ; // True iff page should be reinitialized
  630. // with the existing data
  631. };
  632. // The following constants are used to piece together INF file contents.
  633. const CString csLBrack(_T("[")) ;
  634. const CString csRBrack(_T("]")) ;
  635. const CString csEmpty(_T("")) ;
  636. const CString csCRLF(_T("\r\n")) ;
  637. const CString csEq(_T(" = ")) ;
  638. const CString csComma(_T(",")) ;
  639. const CString csCommaSp(_T(", ")) ;
  640. const CString csQuote(_T("\"")) ;
  641. const CString csAtSign(_T("@")) ;
  642. const CString csBSlash(_T("\\")) ;
  643. /////////////////////////////////////////////////////////////////////////////
  644. // CINFWizard
  645. class CINFWizard : public CPropertySheet
  646. {
  647. CProjectView* m_pcpvParent ; // Parent window
  648. CProjectRecord* m_pcpr ; // Document class ptr
  649. DECLARE_DYNAMIC(CINFWizard)
  650. // Construction
  651. public:
  652. CINFWizard(CWnd* pParentWnd = NULL, UINT iSelectPage = 0) ;
  653. // Attributes
  654. public:
  655. CStringArray m_csaSrcDskFiles ; // Used to collect SourceDiskFiles names
  656. // Operations
  657. public:
  658. void SetFixupFlags() ;
  659. CProjectView* GetOwner() { return m_pcpvParent ; }
  660. CModelData& GetModel(unsigned uidx) ;
  661. unsigned GetModelCount() ;
  662. CStringArray& GetINFModels() { return m_ciwm.m_csaModels ; }
  663. CStringArray& GetINFModelsLst() { return m_ciwm.m_csaModelsLast ; }
  664. unsigned GetINFModsSelCount() { return m_ciwm.m_uNumModelsSel ; }
  665. bool GenerateINFFile() ;
  666. void ChkForNonStdAdditions(CString& cs, LPCTSTR strsection) ;
  667. void BldModSpecSec(CString& csinf) ;
  668. CString GetModelFile(CString& csmodel, bool bfspec = false) ;
  669. void BuildInstallAndCopySecs(CString& csinf) ;
  670. void QuoteFile(CString& csf) {
  671. if (csf.Find(_T(" ")) != -1)
  672. csf = csQuote + csf + csQuote ;
  673. }
  674. void AddFileList(CString& cssection, CStringArray* pcsa) ;
  675. void AddSourceDisksFilesSec(CString& csinf) ;
  676. void AddNonStandardSecs(CString& csinf) ;
  677. void PrepareToRestart() ;
  678. void BiDiDataChanged() ;
  679. void AddDataSectionStmt(CString& csinst, int nmod) ;
  680. void AddIncludeNeedsStmts(CString& csinst, int nmod) ;
  681. void NonStdSecsChanged() ;
  682. void AddNonStdSectionsForModel(CString& csinst, int nmod, CString& csmodel);
  683. bool ReadGPDAndGetDLLName(CString& csdrvdll, CString& csmodel,
  684. CStringArray& csagpdfile, CString& csmodelfile) ;
  685. void AddICMFilesToDestDirs(CString& cssection) ;
  686. // Overrides
  687. // ClassWizard generated virtual function overrides
  688. //{{AFX_VIRTUAL(CINFWizard)
  689. //}}AFX_VIRTUAL
  690. // Implementation
  691. public:
  692. virtual ~CINFWizard();
  693. // Generated message map functions
  694. protected:
  695. //{{AFX_MSG(CINFWizard)
  696. // NOTE - the ClassWizard will add and remove member functions here.
  697. //}}AFX_MSG
  698. DECLARE_MESSAGE_MAP()
  699. public:
  700. // Allocate class instances for each page
  701. CINFWizWelcome m_ciww ;
  702. CINFWizModels m_ciwm ;
  703. CINFWizGetPnPIDs m_ciwgpi ;
  704. CINFWizBiDi m_ciwbd ;
  705. CINFWizICMProfiles m_ciwip ;
  706. CINFWizIncludeFiles m_ciwif ;
  707. CINFWizInstallSections m_ciwis ;
  708. CINFWizDataSections m_ciwds ;
  709. CINFWizExtraFiles m_ciwef ;
  710. CINFWizMfgName m_ciwmn ;
  711. CINFWizNonStdElts m_ciwnse ;
  712. CINFWizNonStdModelSecs m_ciwnsms ;
  713. CINFWizSummary m_ciws ;
  714. CString m_csINFContents ; // INF contents built here
  715. CUIntArray m_cuiaNonStdSecsFlags ; // Flags set when sec used
  716. CGPDContainer* m_pcgc ; // RAID 0001
  717. };
  718. /////////////////////////////////////////////////////////////////////////////
  719. /////////////////////////////////////////////////////////////////////////////
  720. // CNewINFSection dialog
  721. class CNewINFSection : public CDialog
  722. {
  723. // Construction
  724. public:
  725. CNewINFSection(CWnd* pParent = NULL); // standard constructor
  726. // Dialog Data
  727. //{{AFX_DATA(CNewINFSection)
  728. enum { IDD = IDD_INFW_Sub_NewSection };
  729. CString m_csNewSection;
  730. //}}AFX_DATA
  731. // Overrides
  732. // ClassWizard generated virtual function overrides
  733. //{{AFX_VIRTUAL(CNewINFSection)
  734. protected:
  735. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  736. //}}AFX_VIRTUAL
  737. // Implementation
  738. protected:
  739. // Generated message map functions
  740. //{{AFX_MSG(CNewINFSection)
  741. virtual void OnOK();
  742. //}}AFX_MSG
  743. DECLARE_MESSAGE_MAP()
  744. };
  745. /////////////////////////////////////////////////////////////////////////////
  746. // CINFCheckView form view
  747. #ifndef __AFXEXT_H__
  748. #include <afxext.h>
  749. #endif
  750. class CINFCheckView : public CFormView
  751. {
  752. protected:
  753. CINFCheckView(); // protected constructor used by dynamic creation
  754. DECLARE_DYNCREATE(CINFCheckView)
  755. // Form Data
  756. public:
  757. //{{AFX_DATA(CINFCheckView)
  758. enum { IDD = IDD_INFCheck };
  759. CListBox m_clbMissingFiles;
  760. //}}AFX_DATA
  761. // Attributes
  762. public:
  763. // Operations
  764. public:
  765. void PostINFChkMsg(CString& csmsg) ;
  766. void DeleteAllMessages(void) ;
  767. // Overrides
  768. // ClassWizard generated virtual function overrides
  769. //{{AFX_VIRTUAL(CINFCheckView)
  770. public:
  771. virtual void OnInitialUpdate();
  772. protected:
  773. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  774. //}}AFX_VIRTUAL
  775. // Implementation
  776. protected:
  777. virtual ~CINFCheckView();
  778. #ifdef _DEBUG
  779. virtual void AssertValid() const;
  780. virtual void Dump(CDumpContext& dc) const;
  781. #endif
  782. // Generated message map functions
  783. //{{AFX_MSG(CINFCheckView)
  784. // NOTE - the ClassWizard will add and remove member functions here.
  785. //}}AFX_MSG
  786. DECLARE_MESSAGE_MAP()
  787. };
  788. /////////////////////////////////////////////////////////////////////////////
  789. /////////////////////////////////////////////////////////////////////////////
  790. // CINFCheckDoc document
  791. class CINFCheckDoc : public CDocument
  792. {
  793. protected:
  794. //CINFCheckDoc(); // protected constructor used by dynamic creation
  795. DECLARE_DYNCREATE(CINFCheckDoc)
  796. // Attributes
  797. public:
  798. // Operations
  799. public:
  800. CINFCheckDoc(); // protected constructor used by dynamic creation
  801. void PostINFChkMsg(CString& csmsg) ;
  802. void DeleteAllMessages(void) ;
  803. // Overrides
  804. // ClassWizard generated virtual function overrides
  805. //{{AFX_VIRTUAL(CINFCheckDoc)
  806. public:
  807. virtual void Serialize(CArchive& ar); // overridden for document i/o
  808. protected:
  809. virtual BOOL OnNewDocument();
  810. //}}AFX_VIRTUAL
  811. // Implementation
  812. public:
  813. virtual ~CINFCheckDoc();
  814. #ifdef _DEBUG
  815. virtual void AssertValid() const;
  816. virtual void Dump(CDumpContext& dc) const;
  817. #endif
  818. // Generated message map functions
  819. protected:
  820. //{{AFX_MSG(CINFCheckDoc)
  821. // NOTE - the ClassWizard will add and remove member functions here.
  822. //}}AFX_MSG
  823. DECLARE_MESSAGE_MAP()
  824. };
  825. /////////////////////////////////////////////////////////////////////////////
  826. // CINFWizView view
  827. class CINFWizView : public CEditView
  828. {
  829. protected:
  830. CINFWizView(); // protected constructor used by dynamic creation
  831. DECLARE_DYNCREATE(CINFWizView)
  832. // Attributes
  833. public:
  834. bool m_bChkingErrsFound ; // True iff file checking error(s) found
  835. CINFCheckDoc* m_pcicdCheckDoc ; // Checking windows document
  836. CMDIChildWnd* m_pcmcwCheckFrame ; // Checking window frame
  837. // Operations
  838. public:
  839. bool PostINFCheckingMessage(CString& csmsg) ;
  840. void CheckArrayOfFiles(CStringArray* pcsa, CString& csfspec,
  841. CString& cspath, CString& csprojpath,
  842. CString& csmodel, int nerrid) ;
  843. void CheckIncludeFiles(CString& csfspec, CString& cspath, CString& csmodel);
  844. void ResetINFErrorWindow() ;
  845. // Overrides
  846. // ClassWizard generated virtual function overrides
  847. //{{AFX_VIRTUAL(CINFWizView)
  848. public:
  849. virtual void OnInitialUpdate();
  850. protected:
  851. virtual void OnDraw(CDC* pDC); // overridden to draw this view
  852. virtual void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView);
  853. //}}AFX_VIRTUAL
  854. // Implementation
  855. protected:
  856. virtual ~CINFWizView();
  857. #ifdef _DEBUG
  858. virtual void AssertValid() const;
  859. virtual void Dump(CDumpContext& dc) const;
  860. #endif
  861. // Generated message map functions
  862. protected:
  863. //{{AFX_MSG(CINFWizView)
  864. afx_msg void OnFILEChangeINF();
  865. afx_msg void OnFILECheckINF();
  866. //}}AFX_MSG
  867. DECLARE_MESSAGE_MAP()
  868. };
  869. /////////////////////////////////////////////////////////////////////////////
  870. /////////////////////////////////////////////////////////////////////////////
  871. // CINFWizDoc document
  872. class CINFWizDoc : public CDocument
  873. {
  874. protected:
  875. CINFWizDoc(); // protected constructor used by dynamic creation
  876. DECLARE_DYNCREATE(CINFWizDoc)
  877. // Attributes
  878. public:
  879. CProjectRecord* m_pcpr ; // Pointer to parent project (workspace)
  880. CINFWizard* m_pciw ; // Pointer to the INF's wizard
  881. bool m_bGoodInit ; // True iff the doc was correctly opened /
  882. // created / initialized.
  883. CGPDContainer* m_pcgc ; // RAID 0001.
  884. // Operations
  885. public:
  886. // Overrides
  887. // ClassWizard generated virtual function overrides
  888. //{{AFX_VIRTUAL(CINFWizDoc)
  889. public:
  890. virtual void Serialize(CArchive& ar); // overridden for document i/o
  891. virtual void OnCloseDocument();
  892. virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
  893. protected:
  894. virtual BOOL OnNewDocument();
  895. //}}AFX_VIRTUAL
  896. // Implementation
  897. public:
  898. CINFWizDoc(CGPDContainer* pcgc, CINFWizard* pciw);
  899. CINFWizDoc(CProjectRecord* cpr, CINFWizard* pciw);
  900. virtual ~CINFWizDoc();
  901. #ifdef _DEBUG
  902. virtual void AssertValid() const;
  903. virtual void Dump(CDumpContext& dc) const;
  904. #endif
  905. // Generated message map functions
  906. protected:
  907. //{{AFX_MSG(CINFWizDoc)
  908. // NOTE - the ClassWizard will add and remove member functions here.
  909. //}}AFX_MSG
  910. DECLARE_MESSAGE_MAP()
  911. };
  912. //{{AFX_INSERT_LOCATION}}
  913. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  914. #endif // !defined(AFX_INFWIZRD_H__D9592262_711B_11D2_ABFD_00C04FA30E4A__INCLUDED_)