29 #include "../../idlib/precompiled.h"
66 if ( ERROR_SUCCESS != RegCreateKeyEx ( HKEY_LOCAL_MACHINE,
mBaseKey, 0,
NULL, 0, KEY_ALL_ACCESS,
NULL, &hKey,
NULL ) )
99 TCHAR keyname[MAX_PATH];
107 if ( ERROR_SUCCESS != RegOpenKeyEx ( HKEY_LOCAL_MACHINE,
mBaseKey, 0, KEY_READ, &hKey ) )
115 for ( i = 0; RegEnumValue ( hKey, i, keyname, &dwSize,
NULL,
NULL,
NULL,
NULL ) == ERROR_SUCCESS; i ++ )
120 if ( ERROR_SUCCESS != RegQueryValueEx ( hKey, keyname,
NULL, &dwType, (LPBYTE)temp, &dwSize ) )
140 if ( ERROR_SUCCESS != RegQueryValueEx ( hKey,
va(
"mru%d", i ),
NULL, &dwType, (LPBYTE)temp, &dwSize ) )
162 wp.length =
sizeof(wp);
167 out =
va(
"%d %d %d %d %d %d %d %d %d %d",
173 wp.rcNormalPosition.left,
174 wp.rcNormalPosition.top,
175 wp.rcNormalPosition.right,
176 wp.rcNormalPosition.bottom,
192 wp.length =
sizeof(wp);
200 sscanf ( key->
GetValue().
c_str(),
"%d %d %d %d %d %d %d %d %d %d",
206 &wp.rcNormalPosition.left,
207 &wp.rcNormalPosition.top,
208 &wp.rcNormalPosition.right,
209 &wp.rcNormalPosition.bottom,
262 col.mask = LVCF_WIDTH;
264 for ( index = 0; ListView_GetColumn ( list, index, &col ); index ++ )
266 widths +=
va(
"%d ", col.cx );
290 while (
NULL != (next = strchr ( parse,
' ' ) ) )
294 sscanf ( parse,
"%d", &width );
297 ListView_SetColumnWidth ( list, index++, width );
311 for ( size --; size >= 0; size --, data++ )
313 binary +=
va(
"%02x", *data );
330 for ( size --; size >= 0 && *parse && *(parse+1); size --, parse += 2, data ++ )
333 sscanf ( parse,
"%02x", &value );
334 *data = (
unsigned char)value;
bool GetWindowPlacement(const char *name, HWND hwnd)
GLsizei const GLfloat * value
assert(prefInfo.fullscreenBtn)
void SetColumnWidths(const char *name, HWND list)
void Init(const char *key)
const idStr & GetKey(void) const
void SetBinary(const char *name, const unsigned char *data, int size)
void Set(const char *key, const char *value)
const char * GetString(const char *key, const char *defaultString="") const
GLsizei GLsizei GLenum GLenum const GLvoid * data
void GetColumnWidths(const char *name, HWND list)
const idStr & GetValue(void) const
const idKeyValue * FindKey(const char *key) const
void SetWindowPlacement(const char *name, HWND hwnd)
static const int MAX_MRU_SIZE
int Append(const type &obj)
void AddRecentFile(const char *filename)
bool RemoveIndex(int index)
int IcmpPrefix(const char *text) const
void GetBinary(const char *name, unsigned char *data, int size)
const char * c_str(void) const
const idKeyValue * GetKeyVal(int index) const
idList< idStr > mRecentFiles
char * va(const char *fmt,...)
int GetNumKeyVals(void) const