4 #include <WINNT/TaLocale.h>
5 #include <WINNT/subclass.h>
13 * DEFINITIONS ________________________________________________________________
18 #define THIS_HINST (HINSTANCE)GetModuleHandle(NULL)
21 #define IDC_WIZARD 898 // WM_COMMAND,IDC_WIZARD: HIWORD(wp)=WIZARD_COMAMND
23 typedef class EXPORTED WIZARD WIZARD, *LPWIZARD;
27 * WIZARD CLASS _______________________________________________________________
33 wcSTATE_ENTER, // now entering state (even w/o display)
34 wcSTATE_LEAVE, // now leaving state (even w/o display)
35 wcIS_STATE_DISABLED, // return TRUE if state disabled
40 int st; // numeric state identifier
41 int idd; // dialog template for wizard pane
42 DLGPROC dlgproc; // dialog procedure for this state
43 LPARAM lp; // lparam for dialog initialization
44 } WIZARD_STATE, *LPWIZARD_STATE;
46 #define BACK_BUTTON 0x0001
47 #define NEXT_BUTTON 0x0002
56 static LPWIZARD GetWizard (HWND hWnd);
57 HWND GetWindow (void);
59 void SetDialogTemplate (int iddTemplate, int idcLeftPane, int idcRightPane, int idcBack, int idcNext);
60 void SetGraphic (int idbGraphic16, int idbGraphic256);
61 void SetStates (LPWIZARD_STATE aStates, size_t cStates);
62 void SetGraphicCallback (void (CALLBACK *pfnCallback)(LPWIZARD pWiz, HDC hdcTarget, LPRECT prTarget, HPALETTE hPal));
65 void SetState (int stNew, BOOL fForce = FALSE);
66 BOOL Show (BOOL fShow = TRUE);
68 void SetBackground (int iddBackground, BOOL fBlue = TRUE, DLGPROC dlgproc = NULL);
69 void SetBackgroundText (LPTSTR pszText, HFONT hfText = NULL);
70 void SetBackgroundText (int idsText, HFONT hfText = NULL);
71 BOOL ShowBackground (BOOL fShow = TRUE);
72 HWND GetBackgroundWindow (void);
74 void EnableButton (int idcButton, BOOL fEnable);
75 void EnableButtons (DWORD dwButtonFlags = BACK_BUTTON | NEXT_BUTTON);
76 void SetButtonText (int idcButton, int idsText);
77 void SetDefaultControl (int idc);
79 BOOL SendStateCommand (int st, WIZARD_COMMAND wc);
83 void Refresh (DWORD dwRefFlags);
84 HWND GetRightHandWindow (void);
85 void GeneratePalette (RGBQUAD *pargb = NULL);
86 LPWIZARD_STATE FindState (int stFind);
88 static BOOL CALLBACK Background_DlgProc (HWND hBkg, UINT msg, WPARAM wp, LPARAM lp);
89 static BOOL CALLBACK Background_PaintHook (HWND hBkg, UINT msg, WPARAM wp, LPARAM lp);
90 void Background_OnInitDialog (HWND hBkg);
91 void Background_OnSize (void);
92 void Background_OnDestroy (void);
93 void Background_OnClose (void);
94 BOOL Background_OnPaint (void);
96 static BOOL CALLBACK Template_DlgProc (HWND hWnd, UINT msg, WPARAM wp, LPARAM lp);
97 static BOOL CALLBACK Template_LeftPaneHook (HWND hLHS, UINT msg, WPARAM wp, LPARAM lp);
98 BOOL Template_ForwardMessage (HWND hWnd, UINT msg, WPARAM wp, LPARAM lp);
99 void Template_OnInitDialog (HWND hWnd);
100 BOOL Template_OnPaintLHS (HWND hLHS);
108 HBITMAP m_bmpGraphic16;
110 HBITMAP m_bmpGraphic256;
111 HPALETTE m_palGraphic;
112 LPWIZARD_STATE m_aStates;
121 DLGPROC m_fnBackground;
122 TCHAR m_szBackground[ cchRESOURCE ];
123 HBITMAP m_bmpBackground;
124 HFONT m_hfBackground;
128 void (CALLBACK *m_pfnCallback)(LPWIZARD pWiz, HDC hdcTarget, LPRECT prTarget, HPALETTE hPal);