-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAppConfig.h
More file actions
33 lines (31 loc) · 1.35 KB
/
Copy pathAppConfig.h
File metadata and controls
33 lines (31 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#pragma once
#include <tchar.h>
#include <Windows.h>
#define CONFIG_COORD_LEFT TEXT("左")
#define CONFIG_COORD_TOP TEXT("上")
#define CONFIG_SIZE_WIDTH TEXT("幅")
#define CONFIG_SIZE_HEIGHT TEXT("嵩")
class ApplicationConfig
{
protected:
HKEY LocalRegistry;
public:
ApplicationConfig();
ApplicationConfig(const TCHAR * const FileName);
~ApplicationConfig();
void GetWindowPosition(POINT * const Coord);
void SetWindowPosition(const POINT * const Coord);
void GetWindowSize(SIZE * const Metric);
void SetWindowSize(const SIZE * const Metric);
protected:
bool Read8(const TCHAR * const Name, unsigned char * const Value);
void Write8(const TCHAR * const Name, const unsigned char Value);
bool Read16(const TCHAR * const Name, unsigned short * const Value);
void Write16(const TCHAR * const Name, const unsigned short Value);
bool Read32(const TCHAR * const Name, unsigned long * const Value);
void Write32(const TCHAR * const Name, const unsigned long Value);
bool Read64(const TCHAR * const Name, unsigned long long * const Value);
void Write64(const TCHAR * const Name, const unsigned long long Value);
bool Read(const TCHAR * const Name, unsigned char ** const Value, const size_t ValueSize, size_t * const ValueSizeGot);
void Write(const TCHAR * const Name, unsigned char * const Value, const size_t ValueSize);
};