注册表简单操作
CString strSection = "MyFreecell"; //读入注册表,英雄榜
CString strIntItem = "My Int Item";
CWinApp* pApp = AfxGetApp();
for(int i=0;i<2;i++)
for(int j=0; j<2;j++)
{
FreecellGame->Record[3*(i+1)+j] = pApp->GetProfileInt(strSection, strIntItem, 0);
if (!FreecellGame->Record[3*(i+1)+j])
FreecellGame->Record[3*(i+1)+j]=0;
}
//pApp->GetProfileInt(strSection, strIntItem, 0);
CString strSection = "MyFreecell"; //写入注册表,英雄榜
CString strIntItem = "My Int Item";
CWinApp* pApp = AfxGetApp();
for(int i=0;i<2;i++)
for(int j=0; j<2;j++)
if (!pApp->WriteProfileInt(strSection, strIntItem, FreecellGame->Record[3*(i+1)+j]))
FreecellGame->Record[3*(i+1)+j]=0;
//pApp->WriteProfileInt(strSection, strIntItem, FreecellGame->Record[3*(i+1)+j]))