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.

105 lines
3.2 KiB

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