Click here to Skip to main content
15,885,757 members
Articles / Desktop Programming / ATL

CM_ConfigBuilder 1.2g: Visual Studio 6/Visual Studio 2005/Visual Studio 2008 Code Generator for Application Settings Graphic Management

Rate me:
Please Sign up or sign in to vote.
4.94/5 (126 votes)
12 Feb 2008CPOL17 min read 696.4K   9.8K   262  
CM_ConfigBuilder generates and compiles the required files to manage your application's settings/preferences and to store/retrieve them in XML format.
// 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_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
Italy Italy
For all Stefano's latest code, binaries and tutorials visit www.codemachines.com

Comments and Discussions