tagging release
[dasher.git] / trunk / Src / Win32 / Common / WinOptions.h
blobdc1c57de19ee986e17e7a1b1c85ee22b30217fad
1 // WinOptions.h
2 //
3 /////////////////////////////////////////////////////////////////////////////
4 //
5 // Copyright (c) 2002 Iain Murray, Inference Group, Cavendish, Cambridge.
6 //
7 /////////////////////////////////////////////////////////////////////////////
9 #ifndef __WinOptions_h__
10 #define __WinOptions_h__
12 #include <string>
13 #include <map>
14 #include <windows.h>
16 // Look for documenting comments here:
17 #include "../../DasherCore/SettingsStore.h"
18 #include "../../Common/NoClones.h"
20 class Dasher::CEventHandler;
22 class CWinOptions:public CSettingsStore, private NoClones {
23 public:
24 CWinOptions(const std::string & Group, const std::string & Product, Dasher::CEventHandler * pEventHandler);
25 ~CWinOptions();
27 #ifndef DASHER_WINCE
28 bool LoadSetting(const std::string & Key, LPWINDOWPLACEMENT pwp);
29 void SaveSetting(const std::string & Key, const LPWINDOWPLACEMENT pwp);
30 #endif
32 private:
33 // Platform Specific settings file management
34 bool LoadSetting(const std::string & Key, bool * Value);
35 bool LoadSetting(const std::string & Key, long *Value);
36 bool LoadSetting(const std::string & Key, std::string * Value);
37 bool LoadSettingT(const std::string & Key, Tstring * Value);
39 void SaveSetting(const std::string & Key, bool Value);
40 void SaveSetting(const std::string & Key, long Value);
41 void SaveSetting(const std::string & Key, const std::string & Value);
43 void SaveSettingT(const std::string & Key, const Tstring & TValue);
45 // Platform Specific helpers
46 HKEY ProductKey;
47 int GetOrCreate(HKEY hKey, LPCTSTR lpSubKey, REGSAM samDesired, HKEY * lpNewKey);
48 // CARE! Users of GetlpByte must call delete[] on *Data after use.
49 bool GetlpByte(const Tstring & key, BYTE ** Data) const;
52 #endif /* #ifndef __WinOptions_h__ */