forked from deepskystacker/DSS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchildprop.h
50 lines (38 loc) · 1.3 KB
/
childprop.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#if !defined(AFX_CHILDPROP_H__INCLUDED_)
#define AFX_CHILDPROP_H__INCLUDED_
// childprop.h : header file
//
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <afxtempl.h>
#include <afxdlgs.h>
#include <afxcmn.h>
/////////////////////////////////////////////////////////////////////////////
// CChildPropertyPage
//
class CChildPropertyPage : public CPropertyPage
{
DECLARE_DYNCREATE(CChildPropertyPage)
public:
CChildPropertyPage() : CPropertyPage() {}
CChildPropertyPage(UINT nIDPage, UINT nIDCaption = 0, UINT nSelectedPage = 0, UINT nIDGroup = 0);
~CChildPropertyPage();
void AddPage(CPropertyPage* pPage) { m_arrPages.Add(pPage); }
CPropertyPage* GetPage(const int i) const { return (i<GetPageCount()) ? m_arrPages[i] : 0; }
CPropertyPage* GetActivePage() const { return (GetPageCount()>0) ? m_Sheet.GetActivePage() : 0; }
BOOL GetPageCount() const { return m_arrPages.GetSize(); }
protected:
virtual void DoDataExchange(CDataExchange* pDX);
virtual BOOL OnInitDialog();
virtual void OnOK();
virtual void OnCancel();
afx_msg LRESULT OnQuerySiblings(WPARAM wParam, LPARAM lParam);
DECLARE_MESSAGE_MAP()
private:
CPropertySheet m_Sheet;
UINT m_nSelectedPage;
UINT m_nIDGroup;
CArray<CPropertyPage*, CPropertyPage*> m_arrPages;
};
#endif // !defined(AFX_CHILDPROP_H__INCLUDED_)