// AsSplitDialog.h : header file
//
#if !defined(_ASSPLITDIALOG_H_)
#define _ASSPLITDIALOG_H_
/////////////////////////////////////////////////////////////////////////////
// CAsSplitDialog dialog
#include <vector>
//#include "resource.h"
using namespace std;
class AFX_EXT_CLASS CAsSplitDialog : public CDialog
{
// Construction
public:
CAsSplitDialog(CWnd* pParent = NULL); // standard constructor
int AppendChild(CWnd* childWindow);
void SelectChild(int index);
CWnd* GetChild(int index);
CWnd* GetActiveChild();
// Dialog Data
//{{AFX_DATA(CAsSplitDialog)
//enum { IDD = IDD_SPLITTERDLG };
CButton cmdOk_;
CButton cmdCancel_;
CTreeCtrl tree_;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAsSplitDialog)
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CAsSplitDialog)
afx_msg void OnSelChangedTree(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnPaint();
afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
virtual BOOL OnInitDialog();
afx_msg void OnItemExpandedTree(NMHDR* pNMHDR, LRESULT* pResult);
//}}AFX_MSG
DECLARE_MESSAGE_MAP();
void DrawBackground(CDC* pDC);
void DrawSplitter(CDC* pDC);
void UpdateWindowSize();
virtual void OnTreeNodeSelection(HTREEITEM oldItem, HTREEITEM newItem);
virtual void OnTreeNodeExpansion(HTREEITEM item);
bool initialized_;
CRect treeRect_;
CRect childRect_;
int splitterPos_;
int selectedChildIndex_;
bool draggingSplitter_;
vector<CWnd*> rightPaneChildren_;
bool HitSplitter(const CPoint& pt);
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(_ASSPLITDIALOG_H_)