home *** CD-ROM | disk | FTP | other *** search
/ Supercompiler 1997 / SUPERCOMPILER97.iso / BC++ Builder / DATA.Z / FILTERS.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-10  |  1.4 KB  |  43 lines

  1. //---------------------------------------------------------------------------
  2. // Borland C++Builder
  3. // Copyright (c) 1987, 1997 Borland International Inc.  All Rights Reserved.
  4. //---------------------------------------------------------------------------
  5. //---------------------------------------------------------------------------
  6. #include <vcl\vcl.h>
  7. #pragma hdrstop
  8.  
  9. #include "filters.h"
  10. //---------------------------------------------------------------------------
  11. #pragma resource "*.dfm"
  12. TFilterDlg *FilterDlg;
  13. //---------------------------------------------------------------------------
  14. __fastcall TFilterDlg::TFilterDlg(TComponent* Owner)
  15.                       : TForm(Owner)
  16. {
  17. }
  18.  
  19. //========================================= TFilterDlg ==========
  20. void __fastcall TFilterDlg::SetFilter(const AnsiString Value)
  21. {
  22.    int P;
  23.  
  24.   Description->Text = "";
  25.   Extension->Text = "";
  26.   if (Value > "")
  27.   {
  28.     P = Value.Pos("|");
  29.     if (!P) P = 256;
  30.     Description->Text = Value.SubString(1, P - 1);
  31.     Extension->Text = Value.SubString(P + 1, 255);
  32.   }
  33. } // end of TFilterDlf::SetFilter()
  34.  
  35. //========================================= TFilterDlg ==========
  36. String __fastcall TFilterDlg::GetFilter(void)
  37. {
  38.   AnsiString Result = Description->Text + "|" + Extension->Text;
  39.   return Result;
  40. } // end of TFilterDlg::GetFilter()
  41.  
  42. //---------------------------------------------------------------------------
  43.