kolibrios-fun/programs/cmm/txtread/ini.h
Kirill Lipatov (Leency) f09eef1c27 use libini wrappers, use human readable event masks
git-svn-id: svn://kolibrios.org@7051 a494cfbc-eb01-0410-851d-a64ba20cac60
2017-10-05 09:37:50 +00:00

21 lines
602 B
C

_ini ini = { "/sys/settings/txtread.ini", "Config" };
void LoadIniSettings()
{
kfont.size.pt = ini.GetInt("FontSize", 14);
encoding = ini.GetInt("Encoding", CH_CP866);
Form.left = ini.GetInt("WinX", 150);
Form.top = ini.GetInt("WinY", 50);
Form.width = ini.GetInt("WinW", 640);
Form.height = ini.GetInt("WinH", 560);
}
void SaveIniSettings()
{
ini.SetInt("FontSize", kfont.size.pt);
ini.SetInt("Encoding", encoding);
ini.SetInt("WinX", Form.left);
ini.SetInt("WinY", Form.top);
ini.SetInt("WinW", Form.width);
ini.SetInt("WinH", Form.height);
}