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.

119 lines
3.7 KiB

  1. //*********************************************************************
  2. //* Microsoft Windows **
  3. //* Copyright(c) Microsoft Corp., 1994-1995 **
  4. //*********************************************************************
  5. //
  6. // WIZARD.H - central header file for ICWCONN
  7. //
  8. // HISTORY:
  9. //
  10. // 05/14/98 donaldm created it
  11. //
  12. #ifndef _WIZARD_H_
  13. #define _WIZARD_H_
  14. #define WIZ97_TITLE_FONT_PTS 12
  15. #define WM_MYINITDIALOG WM_USER
  16. #define WM_USER_NEXT (WM_USER + 100)
  17. #define WM_USER_CUSTOMINIT (WM_USER + 101)
  18. #define WM_USER_BACK (WM_USER + 102)
  19. #define MAX_RES_LEN 255
  20. #define SMALL_BUF_LEN 48
  21. extern const VARIANT c_vaEmpty;
  22. //
  23. // BUGBUG: Remove this ugly const to non-const casting if we can
  24. // figure out how to put const in IDL files.
  25. //
  26. #define PVAREMPTY ((VARIANT*)&c_vaEmpty)
  27. // Globals used by multiple files.
  28. extern WIZARDSTATE* gpWizardState;
  29. extern HINSTANCE ghInstance;
  30. extern HINSTANCE ghInstanceResDll;
  31. extern PAGEINFO PageInfo[];
  32. extern INT _convert;
  33. extern UINT g_uExternUIPrev;
  34. extern UINT g_uExternUINext;
  35. extern BOOL gfQuitWizard;
  36. extern BOOL gfUserCancelled;
  37. extern BOOL gfUserBackedOut;
  38. extern BOOL gfUserFinished;
  39. extern BOOL gfBackedUp;
  40. extern BOOL gfReboot;
  41. extern BOOL g_bMalformedPage;
  42. extern BOOL g_bCustomPaymentActive;
  43. extern BOOL gfISPDialCancel;
  44. // Trace flags
  45. #define TF_APPRENTICE 0x00000010
  46. #define TF_CLASSFACTORY 0x00000020
  47. #define TF_ICWCONN 0x00000040
  48. #define TF_GENDLG 0x00000080
  49. #define TF_ISPSELECT 0x00000100
  50. // Function avalable in UTIL.CPP
  51. LPTSTR LoadSz (UINT idString,LPTSTR lpszBuf,UINT cbBuf);
  52. int MsgBox (HWND hWnd,UINT nMsgID,UINT uIcon,UINT uButtons);
  53. int MsgBoxSz (HWND hWnd,LPTSTR szText,UINT uIcon,UINT uButtons);
  54. void ShowWindowWithParentControl (HWND hwndChild);
  55. BOOL FSz2Dw(LPCSTR pSz,DWORD far *dw);
  56. BOOL FSz2W(LPCSTR pSz,WORD far *w);
  57. BOOL FSz2WEx(LPCSTR pSz,WORD far *w); //Accepts -1 as a valid number. currently this is used for LCID, since all langs has a LDID == -1
  58. BOOL FSz2B(LPCSTR pSz,BYTE far *pb);
  59. BOOL FSz2BOOL(LPCSTR pSz,BOOL far *pbool);
  60. BOOL FSz2SPECIAL(LPCSTR pSz,BOOL far *pbool, BOOL far *pbIsSpecial, int far *pInt);
  61. HRESULT ConnectToConnectionPoint
  62. (
  63. IUnknown *punkThis,
  64. REFIID riidEvent,
  65. BOOL fConnect,
  66. IUnknown *punkTarget,
  67. DWORD *pdwCookie,
  68. IConnectionPoint **ppcpOut
  69. );
  70. void WaitForEvent(HANDLE hEvent);
  71. void StartIdleTimer();
  72. void KillIdleTimer();
  73. void ShowProgressAnimation();
  74. void HideProgressAnimation();
  75. // String conversion in UTIL.CPP
  76. LPWSTR WINAPI A2WHelper(LPWSTR lpw, LPCSTR lpa, int nChars);
  77. LPSTR WINAPI W2AHelper(LPSTR lpa, LPCWSTR lpw, int nChars);
  78. #ifndef A2WHELPER
  79. #define A2WHELPER A2WHelper
  80. #define W2AHELPER W2AHelper
  81. #endif
  82. #ifdef UNICODE
  83. // In this module, A2W and W2A are not required.
  84. #define A2W(lpa) (lpa)
  85. #define W2A(lpw) (lpw)
  86. #else // UNICODE
  87. #define A2W(lpa) (\
  88. ((LPCSTR)lpa == NULL) ? NULL : (\
  89. _convert = (lstrlenA(lpa)+1),\
  90. A2WHELPER((LPWSTR) alloca(_convert*2), lpa, _convert)))
  91. #define W2A(lpw) (\
  92. ((LPCWSTR)lpw == NULL) ? NULL : (\
  93. _convert = (lstrlenW(lpw)+1)*2,\
  94. W2AHELPER((LPTSTR) alloca(_convert), lpw, _convert)))
  95. #endif // UNICODE
  96. #define A2CW(lpa) ((LPCWSTR)A2W(lpa))
  97. #define W2CA(lpw) ((LPCSTR)W2A(lpw))
  98. #endif // _WIZARD_H_