-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathIntReg.cpp
More file actions
29 lines (24 loc) · 732 Bytes
/
Copy pathIntReg.cpp
File metadata and controls
29 lines (24 loc) · 732 Bytes
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
// IntReg.cpp: implementation of the CIntReg class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "renlib.h"
#include "IntReg.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CIntReg::CIntReg(const CString& strSection, const CString& strEntry, int nDefault)
: mSection(strSection),
mEntry(strEntry)
{
mValue = AfxGetApp()->GetProfileInt(mSection, mEntry, nDefault);
}
CIntReg::~CIntReg()
{
AfxGetApp()->WriteProfileInt(mSection, mEntry, mValue);
}