main.cpp
上传用户:hylc_2004
上传日期:2014-01-23
资源大小:46800k
文件大小:2k
源码类别:

Delphi控件源码

开发平台:

Delphi

  1. //---------------------------------------------------------------------------
  2. #include <vcl.h>
  3. #pragma hdrstop
  4. #include "main.h"
  5. //---------------------------------------------------------------------------
  6. #pragma package(smart_init)
  7. #pragma link "DSPack"
  8. #pragma resource "*.dfm"
  9. TMainForm *MainForm;
  10. //---------------------------------------------------------------------------
  11. __fastcall TMainForm::TMainForm(TComponent* Owner)
  12.         : TForm(Owner)
  13. {
  14. }
  15. //---------------------------------------------------------------------------
  16. void __fastcall TMainForm::MenuOpenClick(TObject *Sender)
  17. {
  18.   if (OpenDialog->Execute()) {
  19.         FilterGraph->Active = FALSE;
  20.         FilterGraph->Active = TRUE;
  21.         FilterGraph->RenderFile(OpenDialog->FileName);
  22.         FilterGraph->Play();
  23.   }
  24. }
  25. //---------------------------------------------------------------------------
  26. void __fastcall TMainForm::FormCloseQuery(TObject *Sender, bool &CanClose)
  27. {
  28.   FilterGraph->Active = FALSE;
  29. }
  30. //---------------------------------------------------------------------------
  31. void __fastcall TMainForm::VideoWindowDblClick(TObject *Sender)
  32. {
  33.   VideoWindow->FullScreen = !VideoWindow->FullScreen;
  34. }
  35. //---------------------------------------------------------------------------
  36. void __fastcall TMainForm::tbPlayClick(TObject *Sender)
  37. {
  38.   FilterGraph->Play();
  39. }
  40. //---------------------------------------------------------------------------
  41. void __fastcall TMainForm::tbPauseClick(TObject *Sender)
  42. {
  43.   FilterGraph->Pause();
  44. }
  45. //---------------------------------------------------------------------------
  46. void __fastcall TMainForm::tbStopClick(TObject *Sender)
  47. {
  48.   FilterGraph->Stop();
  49. }
  50. //---------------------------------------------------------------------------