void activateHelpConnector()
{
CString curPath = getCurARXPath(); // это путь к папке, где установлена текущая ARX
CString hlpConnectorFile = curPath + _T("\\asdf.commands");// этот файл также лежит в корне папки проги
curPath.AppendChar(_T('\\'));
if ( TRUE == ::PathFileExists(hlpConnectorFile.GetString()) )
{
FILE* fin = _tfopen(hlpConnectorFile.GetString(),_T("r"));
if(!fin) return;
ACHAR strCommand[_MAX_PATH];
ACHAR strFile[_MAX_PATH];
ACHAR strAlias[_MAX_PATH];
CString localHelpFile;
while(!feof(fin))
{
_tcsncpy(strCommand,_T("\0"),_MAX_PATH);
_tcsncpy(strFile,_T("\0"),_MAX_PATH);
_tcsncpy(strAlias,_T("\0"),_MAX_PATH);
localHelpFile.Empty();
localHelpFile.Append(curPath.GetString());
_ftscanf(fin,_T("%s%s%s"),strCommand,strFile,strAlias);
localHelpFile.Append(strFile);
acedSetFunHelp(strCommand,localHelpFile.GetString(),strAlias,0);
}
fclose(fin);
}
}