3 /////////////////////////////////////////////////////////////////////////////
5 // Copyright (c) 2002 Iain Murray, Inference Group, Cavendish, Cambridge.
7 /////////////////////////////////////////////////////////////////////////////
9 #ifndef __WinOptions_h__
10 #define __WinOptions_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
{
24 CWinOptions(const std::string
& Group
, const std::string
& Product
, Dasher::CEventHandler
* pEventHandler
);
28 bool LoadSetting(const std::string
& Key
, LPWINDOWPLACEMENT pwp
);
29 void SaveSetting(const std::string
& Key
, const LPWINDOWPLACEMENT pwp
);
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
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__ */