?? qini.cpp
字號:
//---------------------------------------------------------------------------
#pragma hdrstop
#include "QINI.h"
#include "QStdlib.h"
#include "Windows.h"
#pragma package(smart_init)
//---------------------------------------------------------------------------
std::string GetConfig(const std::string& Key)
{
return GetConfig(GetAppPath() + "Config.ini", "CONFIG", Key);
}
//---------------------------------------------------------------------------
std::string GetConfig(const std::string& Tab, const std::string& Key)
{
return GetConfig(GetAppPath() + "Config.ini", Tab, Key);
}
//---------------------------------------------------------------------------
std::string GetConfig(const std::string& File, const std::string& Tab, const std::string& Key)
{
char buf[65536];
int len = ::GetPrivateProfileString(Tab.c_str(), Key.c_str(), "", buf
,sizeof(buf), File.c_str());
return std::string(buf, len);
}
//---------------------------------------------------------------------------
int GetConfigInt(const std::string& Key)
{
return QStrToInt(GetConfig(Key));
}
//---------------------------------------------------------------------------
bool SetConfig(const std::string& Key, const std::string& Value)
{
return SetConfig(GetAppPath() + "Config.ini", "CONFIG", Key, Value);
}
//---------------------------------------------------------------------------
bool SetConfig(const std::string& Tab, const std::string& Key, const std::string& Value)
{
return SetConfig(GetAppPath() + "Config.ini", Tab, Key, Value);
}
//---------------------------------------------------------------------------
bool SetConfig(const std::string& File, const std::string& Tab, const std::string& Key, const std::string& Value)
{
return ::WritePrivateProfileString(Tab.c_str(), Key.c_str(), Value.c_str(), File.c_str());
}
//---------------------------------------------------------------------------
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -