home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 February / Chip_2001-02_cd1.bin / sharewar / vecad / examples / bcb / editor / Strings.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-20  |  965 b   |  33 lines

  1. //---------------------------------------------------------------------------
  2. #include <vcl.h>
  3. #pragma hdrstop
  4.  
  5. #include "VecApi.h"
  6. #include "Strings.h"
  7.  
  8. //---------------------------------------------------------------------------
  9. #pragma package(smart_init)
  10.  
  11. //-------------------------------------------------------------------
  12. //  Overwrite VeCAD strings
  13. //  Used to localize VeCAD to other languages
  14. //-------------------------------------------------------------------
  15. int LoadString (int Id)
  16. {
  17.   char* str = NULL;
  18.   int res = 1;
  19.   // assign new string according to string's identifier
  20.   switch( Id ){
  21.     case VS_PRINT_TITLE:   str="Print2"; break;
  22.     case VS_ENTPROP_TITLE: str="Objects properties 2"; break;
  23.     case VS_LINE_TITLE:    str="Line2"; break;
  24.     default:
  25.       res = 0;  // string was not overwritten
  26.   }
  27.   // pass new string to VeCAD
  28.   if (res==1){
  29.     vlPropPut( VD_MSG_STRING, 0, str );
  30.   }
  31.   return res;
  32. }
  33.