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

Function AddLastOpenDocsToMenu

sourcecommon/utils.cpp:1027–1049  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1025}
1026//---------------------------------------------------------------------------
1027void AddLastOpenDocsToMenu(char * szIniFile, TMenuItem ** mi)
1028{
1029 TMYIniFile * p = NULL;
1030 try
1031 {
1032 // open in read only mode
1033 p = new TMYIniFile(szIniFile, false, false);
1034 char Section[] = "LASTDOCS";
1035 char str[20];
1036 char str1[MN];
1037
1038 for(int i=0; i<MAX_LAST_OPEN_DOCS; i++)
1039 {
1040 wsprintf(str, "%u", i+1);
1041 lstrcpyn(str1, p->ReadString(Section, str).c_str(), sizeof(str1));
1042 //
1043 mi[i]->Caption = str1;
1044 mi[i]->Visible = lstrlen(str1) > 0;
1045 }
1046 }
1047 catch(...) {}
1048 delete p;
1049}
1050//---------------------------------------------------------------------------
1051int VarToBinary(Variant v, BYTE * buf, int size)
1052{

Callers

nothing calls this directly

Calls 1

ReadStringMethod · 0.45

Tested by

no test coverage detected