home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 February / Chip_2001-02_cd1.bin / sharewar / vecad / examples / delphi / editor / Strings.pas < prev   
Encoding:
Pascal/Delphi Source File  |  2000-09-18  |  851 b   |  40 lines

  1. unit Strings;
  2.  
  3. interface
  4. uses
  5.   Windows;
  6.  
  7. function  LoadString (Id:Integer): Integer;
  8.  
  9. implementation
  10.  
  11. uses
  12.   VecApi;
  13.  
  14.  
  15. //-------------------------------------------------------------------
  16. //  Overwrite VeCAD strings
  17. //  Used to localize VeCAD to other languages
  18. //-------------------------------------------------------------------
  19. function LoadString (Id:Integer): Integer;
  20. var
  21.   str: Pchar;
  22.   res: Integer;
  23. begin
  24.   str := '';
  25.   res := 1;
  26.   // assign new string according to string's identifier
  27.   case Id of
  28.     VS_PRINT_TITLE:   str:='Print2';
  29.     VS_ENTPROP_TITLE: str:='Objects properties 2';
  30.     VS_LINE_TITLE:    str:='Line2';
  31.     else
  32.       res := 0;  // string was not overwritten
  33.   end;
  34.   // pass new string to VeCAD
  35.   if res=1 then vlPropPut( VD_MSG_STRING, 0, str );
  36.   LoadString := res;
  37. end;
  38.  
  39. end.
  40.