2013-08-21 05:54:54 +00:00
|
|
|
/*
|
|
|
|
* A library for storing parameters in the registry.
|
|
|
|
*
|
|
|
|
* Jonathan Westhues, 2002
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __FREEZE_H
|
|
|
|
#define __FREEZE_H
|
|
|
|
|
|
|
|
#ifndef FREEZE_SUBKEY
|
|
|
|
#error must define FREEZE_SUBKEY to a string uniquely identifying the app
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define FreezeWindowPos(hwnd) FreezeWindowPosF(hwnd, FREEZE_SUBKEY, #hwnd)
|
2013-08-26 18:58:35 +00:00
|
|
|
void FreezeWindowPosF(HWND hWnd, const char *subKey, const char *name);
|
2013-08-21 05:54:54 +00:00
|
|
|
|
|
|
|
#define ThawWindowPos(hwnd) ThawWindowPosF(hwnd, FREEZE_SUBKEY, #hwnd)
|
2013-08-26 18:58:35 +00:00
|
|
|
void ThawWindowPosF(HWND hWnd, const char *subKey, const char *name);
|
2013-08-21 05:54:54 +00:00
|
|
|
|
|
|
|
#define FreezeDWORD(val) FreezeDWORDF(val, FREEZE_SUBKEY, #val)
|
2013-08-26 18:58:35 +00:00
|
|
|
void FreezeDWORDF(DWORD val, const char *subKey, const char *name);
|
2013-08-21 05:54:54 +00:00
|
|
|
|
|
|
|
#define ThawDWORD(val) val = ThawDWORDF(val, FREEZE_SUBKEY, #val)
|
2013-08-26 18:58:35 +00:00
|
|
|
DWORD ThawDWORDF(DWORD val, const char *subKey, const char *name);
|
2013-08-21 05:54:54 +00:00
|
|
|
|
|
|
|
#define FreezeString(val) FreezeStringF(val, FREEZE_SUBKEY, #val)
|
2013-08-26 18:58:35 +00:00
|
|
|
void FreezeStringF(const char *val, const char *subKey, const char *name);
|
2013-08-21 05:54:54 +00:00
|
|
|
|
|
|
|
#define ThawString(val, max) ThawStringF(val, max, FREEZE_SUBKEY, #val)
|
2013-08-26 18:58:35 +00:00
|
|
|
void ThawStringF(char *val, int max, const char *subKey, const char *name);
|
2013-08-21 05:54:54 +00:00
|
|
|
|
|
|
|
|
|
|
|
#endif
|