Click here to Skip to main content
11,642,855 members (72,466 online)
Click here to Skip to main content
Add your own
alternative version

Save Application Settings to XML

, 16 Sep 2002 202.5K 1.4K 53
An easy to use class that reads, writes and deletes app settings to an XML file.
xmlsettings_demo.zip
XmlSettingsTest.clw
XmlSettingsTest.dsp
XmlSettingsTest.dsw
res
XmlSettingsTest.ico
mainpic.bmp
bitmap2.bmp
Release
XmlSettingsTest.exe
xmlsettings_src.zip
// XmlSettingsTestDlg.h : header file
//

#if !defined(AFX_XMLSETTINGSTESTDLG_H__31392CFC_D7AF_4D9A_812D_7913A1A43E3B__INCLUDED_)
#define AFX_XMLSETTINGSTESTDLG_H__31392CFC_D7AF_4D9A_812D_7913A1A43E3B__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "XMLSettings.h"

/////////////////////////////////////////////////////////////////////////////
// CXmlSettingsTestDlg dialog

class CXmlSettingsTestDlg : public CDialog
{
// Construction
public:
	CXmlSettingsTestDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CXmlSettingsTestDlg)
	enum { IDD = IDD_XMLSETTINGSTEST_DIALOG };
	CStatic	m_ValueStatic;
	CEdit	m_edValueName;
	CEdit	m_edValue;
	CEdit	m_edKeyPath;
	CEdit	m_edFilePath;
	CButton m_radioString;
	CButton m_radioLong;
	CButton m_radioRead;
	CButton m_radioWrite;
	CButton	m_radioDelete;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CXmlSettingsTestDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	CXMLSettings xmlSettings;

	// Generated message map functions
	//{{AFX_MSG(CXmlSettingsTestDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnStringradio();
	afx_msg void OnLongradio();
	afx_msg void OnReadradio();
	afx_msg void OnWriteradio();
	virtual void OnOK();
	afx_msg void OnView();
	afx_msg void OnDeleteradio();
	afx_msg void OnQuestion();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_XMLSETTINGSTESTDLG_H__31392CFC_D7AF_4D9A_812D_7913A1A43E3B__INCLUDED_)

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 has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Jason Henderson
Software Developer (Senior)
United States United States
I have been a professional developer since 1996. I live in the middle of no where in Illinois, USA. I am married and have four children.

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.150731.1 | Last Updated 17 Sep 2002
Article Copyright 2002 by Jason Henderson
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid