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.

103 lines
3.2 KiB

  1. #ifndef __CUSTOMAW_H__
  2. #define __CUSTOMAW_H__
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif
  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. // overriden (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. // overriden (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. };
  58. /////////////////////////////////////////////////////////////////////////////
  59. // C API's exported by AppWizard. The custom AppWizard talks to MFCAPWZ.DLL
  60. // by calling these functions.
  61. // Values to be passed to GetDialog()
  62. enum AppWizDlgID
  63. {
  64. APWZDLG_APPTYPE = 1,
  65. APWZDLG_DATABASE,
  66. APWZDLG_OLE,
  67. APWZDLG_DOCAPPOPTIONS,
  68. APWZDLG_PROJOPTIONS,
  69. APWZDLG_CLASSES,
  70. APWZDLG_DLGAPPOPTIONS,
  71. APWZDLG_DLLPROJOPTIONS,
  72. };
  73. void SetCustomAppWizClass(CCustomAppWiz* pAW);
  74. CAppWizStepDlg* GetDialog(AppWizDlgID nID);
  75. void SetNumberOfSteps(int nSteps);
  76. BOOL ScanForAvailableLanguages(CStringList& rLanguages);
  77. void SetSupportedLanguages(LPCTSTR szSupportedLangs);
  78. #endif //__CUSTOMAW_H__