00001
00002
00003
00004
00005
00006 #if !defined(AFX_VMSAPPSETTINGSSTORE_H__232450C9_092A_49EF_9B4E_3D2DA2B9E736__INCLUDED_)
00007 #define AFX_VMSAPPSETTINGSSTORE_H__232450C9_092A_49EF_9B4E_3D2DA2B9E736__INCLUDED_
00008
00009 #include "vmsDataFile.h"
00010 #if _MSC_VER > 1000
00011 #pragma once
00012 #endif
00013
00014 class vmsAppSettingsStore
00015 {
00016 public:
00017 void SaveSettingsToFile(LPCSTR pszFile);
00018 void LoadSettingsFromFile (LPCSTR pszFile);
00019
00020 BOOL WriteProfileBinary (LPCSTR pszSection, LPCSTR pszEntry, LPBYTE pbData, UINT nBytes);
00021 BOOL GetProfileBinary (LPCSTR pszSection, LPCSTR pszEntry, LPBYTE* ppData, UINT* pBytes);
00022
00023 BOOL WriteProfileString(LPCSTR pszSection, LPCSTR pszEntry, LPCSTR pszValue);
00024 CString GetProfileString(LPCSTR pszSection, LPCSTR pszEntry, LPCSTR pszDefault);
00025
00026 BOOL WriteProfileInt (LPCSTR pszSection, LPCSTR pszEntry, int nValue);
00027 UINT GetProfileInt (LPCSTR pszSection, LPCSTR pszEntry, INT nDefault);
00028
00029 vmsAppSettingsStore();
00030 virtual ~vmsAppSettingsStore();
00031
00032 protected:
00033
00034 bool m_bUseRegistry;
00035 vmsDataFile m_file;
00036 CWinApp* m_app;
00037 };
00038
00039 #endif