MCPcopy Create free account
hub / github.com/MaxBelkov/visualsyslog / Load

Method Load

sourcecommon/utils.cpp:193–214  ·  view source on GitHub ↗

---------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

191}
192//---------------------------------------------------------------------------
193bool TMyFont::Load(TMYIniFile * f, char * Section)
194{
195 bool bRetVal = true;
196 try
197 {
198 strncpy(Name, f->ReadString(Section, "FontName").c_str(), 31);
199 Name[31] = NULL;
200 if( strlen(Name)<=0 )
201 {
202 strcpy(Name, "Tahoma");
203 bRetVal = false;
204 }
205 Height = f->ReadInteger(Section, "FontHeight", -13);
206 Pitch = (TFontPitch)f->ReadInteger(Section, "FontPitch", 0);
207 PixelsPerInch = f->ReadInteger(Section, "FontPixelsPerInch", 120);
208 Size = f->ReadInteger(Section, "FontSize", 8);
209 Style = (BYTE)f->ReadInteger(Section, "FontStyle", 0);
210 Color = (TColor)f->ReadInteger(Section, "FontColor", clBlack);
211 }
212 catch(...) { bRetVal = false; }
213 return bRetVal;
214}
215//---------------------------------------------------------------------------
216bool TMyFont::Save(TMYIniFile * f, char * Section)
217{

Callers

nothing calls this directly

Calls 2

ReadStringMethod · 0.45
ReadIntegerMethod · 0.45

Tested by

no test coverage detected