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.

99 lines
3.0 KiB

  1. #ifndef __CUSTOMAW_H__
  2. #define __CUSTOMAW_H__
  3. /////////////////////////////////////////////////////////////////////////////
  4. // customaw.h -- Header file to be included by all custom AppWizards.
  5. // Link to the AppWizard import library
  6. #pragma comment(lib, "mfcapwz.lib")
  7. /////////////////////////////////////////////////////////////////////////////
  8. // Class CAppWizStepDlg-- all custom AppWizard steps must derive from
  9. // this class
  10. class CAppWizStepDlg : public CDialog
  11. {
  12. public:
  13. CAppWizStepDlg(UINT nIDTemplate);
  14. ~CAppWizStepDlg();
  15. virtual BOOL OnDismiss();
  16. // You will probably not want to override or call this function. It is
  17. // overriden (for CAppWizStepDlg) in MFCAPWZ.DLL to handle tabbing from
  18. // the dialog controls in CAppWizStepDlg to the outer AppWizard dialog's
  19. // controls.
  20. virtual BOOL PreTranslateMessage(MSG* pMsg);
  21. // You will probably not want to override or call this function. It is
  22. // overriden (for CAppWizStepDlg) in MFCAPWZ.DLL to dynamically change
  23. // the dialog template's font to match the rest of the IDE.
  24. virtual BOOL Create(UINT nIDTemplate, CWnd* pParentWnd = NULL);
  25. UINT m_nIDTemplate;
  26. };
  27. /////////////////////////////////////////////////////////////////////////////
  28. // class OutputStream-- this abstract class is used to funnel output while
  29. // parsing templates.
  30. class OutputStream
  31. {
  32. public:
  33. virtual void WriteLine(LPCTSTR lpsz) = 0;
  34. virtual void WriteBlock(LPCTSTR pBlock, DWORD dwSize) = 0;
  35. };
  36. /////////////////////////////////////////////////////////////////////////////
  37. // Class CCustomAppWiz-- all custom AppWizards must have a class derived from
  38. // this. MFCAPWZ.DLL talks to the custom AppWizard by calling these virtual
  39. // functions.
  40. class CCustomAppWiz : public CObject
  41. {
  42. public:
  43. CMapStringToString m_Dictionary;
  44. virtual void GetPlatforms(CStringList& rPlatforms) {}
  45. virtual CAppWizStepDlg* Next(CAppWizStepDlg* pDlg) { return NULL; }
  46. virtual CAppWizStepDlg* Back(CAppWizStepDlg* pDlg) { return NULL; }
  47. virtual void InitCustomAppWiz() { m_Dictionary.RemoveAll(); }
  48. virtual void ExitCustomAppWiz() {}
  49. virtual LPCTSTR LoadTemplate(LPCTSTR lpszTemplateName,
  50. DWORD& rdwSize, HINSTANCE hInstance = NULL);
  51. virtual void CopyTemplate(LPCTSTR lpszInput, DWORD dwSize, OutputStream* pOutput);
  52. virtual void ProcessTemplate(LPCTSTR lpszInput, DWORD dwSize, OutputStream* pOutput);
  53. virtual void PostProcessTemplate(LPCTSTR szTemplate) {}
  54. };
  55. /////////////////////////////////////////////////////////////////////////////
  56. // C API's exported by AppWizard. The custom AppWizard talks to MFCAPWZ.DLL
  57. // by calling these functions.
  58. // Values to be passed to GetDialog()
  59. enum AppWizDlgID
  60. {
  61. APWZDLG_APPTYPE = 1,
  62. APWZDLG_DATABASE,
  63. APWZDLG_OLE,
  64. APWZDLG_DOCAPPOPTIONS,
  65. APWZDLG_PROJOPTIONS,
  66. APWZDLG_CLASSES,
  67. APWZDLG_DLGAPPOPTIONS,
  68. APWZDLG_DLLPROJOPTIONS,
  69. };
  70. void SetCustomAppWizClass(CCustomAppWiz* pAW);
  71. CAppWizStepDlg* GetDialog(AppWizDlgID nID);
  72. void SetNumberOfSteps(int nSteps);
  73. BOOL ScanForAvailableLanguages(CStringList& rLanguages);
  74. void SetSupportedLanguages(LPCTSTR szSupportedLangs);
  75. #endif //__CUSTOMAW_H__