Total Commander Forum Index Total Commander
Форум поддержки пользователей Total Commander
Сайты: Все о Total Commander | Totalcmd.net | Ghisler.com | RU.TCKB
 
 RulesRules   SearchSearch   FAQFAQ   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Single Post  Topic: [Req] WDX для отображения 1-й строки файла 
Author Message
Alextp



PostPosted: Wed Aug 01, 2007 18:08    Post subject: Reply with quote

Очень просто написать плагин к FileDesc.
Вот например, плагин, который читает описание из VersionInfo:


Code:
function ImportDesc_SameFile(PluginID: Word; FileName, Desc: PChar;
  RequireFile: TWIRequireFileProc): Boolean; stdcall;
var
  fn, ver1, ver2: string;
begin
  Result:= false;
  fn:= RequireFile(FileName);
  case PluginID of
    0:
      begin
      ver1:= FileVersionInfo(fn, 'FileDescription');
      ver2:= FileVersionInfo(fn, '');
      if ver2<>'' then
        ver1:= SFormat('%s (%s)', [ver1, ver2]);
      StrLCpy(Desc, PChar(ver1), MaxDescLength);
      Result:= lstrlen(Desc)>0;
      Exit
      end;
  end;
end;



как видишь, все очень просто - написать одну ф-цию (остальное взять как есть) и плагин готов
_________________
UniViewer - CudaText - LogViewer
View user's profile Send private message


Powered by phpBB © 2001, 2005 phpBB Group