Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
cWndWizard.h
Go to the documentation of this file.
1 //
4 //
5 
6 #ifndef _INC_cWndWizard_H
7 #define _INC_cWndWizard_H
8 #ifndef NO_PRAGMA_ONCE
9 #pragma once
10 #endif
11 
12 #include "cWndDialog.h"
13 #include "../Geometry/cPoint2.h"
14 
15 #if defined(_WIN32) && ! defined(_MFC_VER)
16 namespace GrayLib
17 {
18  class cWndWizard;
19 
20  class cWndWizardPage
21  : public cWndDialogBase
22  {
26  typedef cWndDialogBase SUPER_t;
27  public:
28  cWndWizard* m_pParent;
29  DLGID_t m_idDialog; // the id of this dialog inside my m_pParent cWndWizard.
30 
31  protected:
32  virtual bool OnInitDialog(LPARAM lParam);
33  virtual bool OnCommand(DLGID_t wID, HWND hwndCtl, WORD wNotifyCode);
34  virtual void OnMove(POINTS pt);
35  virtual void EndDialog(int iRet);
36  virtual BOOL DefDialogProc(WINMSG_t message, WPARAM wParam, LPARAM lParam);
37 
38  public:
39  cWndWizardPage( cWndWizard* pParent, DLGID_t id );
40  ~cWndWizardPage();
41  INT_PTR DoModal();
42 
43  virtual bool UpdateData()
44  { return true; }
45  };
46 
47  class cWndWizard : protected cWindow
48  {
52 
53  friend class cWndWizardPage;
54 
55  private:
56  cString m_sAppName;
57  HICON m_hIcon;
58  cPoint2i m_Position;
59  cWinSize m_Size;
60 
61  cWndWizardPage* m_pWndCur;
62  cArrayPtr<cWndWizardPage> m_aStack;
63 
64  public:
65  cWndWizard();
66  ~cWndWizard(void);
67 
68  bool WizInit( const FILECHAR_t* pszAppName, HICON hIcon = WINHANDLE_NULL );
69  void WizClose();
70 
71  cWndWizardPage* get_WizPageCurrent() const
72  {
73  return m_pWndCur;
74  }
75  DLGID_t get_WizPageCurrentId() const
76  {
77  cWndWizardPage* pPage = get_WizPageCurrent();
78  if ( pPage == nullptr )
79  return 0;
80  return pPage->m_idDialog;
81  }
82  cWndWizardPage* get_WizPagePrev() const;
83  };
84 };
85 #endif
86 #endif
UINT WINMSG_t
Supplement _WIN32 "windows.h".
Definition: WinTypes.h:111
#define WINHANDLE_NULL
HWND, HPEN, etc are NOT OS Handles. like HWND_DESKTOP. like HANDLEPTR_NULL. This is a WINAPI void* ha...
Definition: cOSHandle.h:23
Definition: cMesh.h:22
UINT DLGID_t
old window format this was a WORD, EX format this is UINT32.
Definition: cResDialog.h:68
char FILECHAR_t
a UTF8 char in a file name. like TCHAR
Definition: FileName.h:22
cStringT< GChar_t > cString
Definition: cString.h:636