Unit1.cpp
Upload User: lhxd_sz
Upload Date: 2014-10-02
Package Size: 38814k
Code Size: 1k
Development Platform:

C++ Builder

  1. //---------------------------------------------------------------------------
  2. #include <vcl.h>
  3. #include <MMSystem.hpp>
  4. #pragma hdrstop
  5. #include "Unit1.h"
  6. //---------------------------------------------------------------------------
  7. #pragma package(smart_init)
  8. #pragma resource "*.dfm"
  9. TForm1 *Form1;
  10. //---------------------------------------------------------------------------
  11. __fastcall TForm1::TForm1(TComponent* Owner)
  12.         : TForm(Owner)
  13. {
  14. }
  15. //---------------------------------------------------------------------------
  16. void __fastcall TForm1::Button1Click(TObject *Sender)
  17. {
  18.   sndPlaySound("test.wav",SND_ASYNC|SND_LOOP);
  19. }
  20. //---------------------------------------------------------------------------
  21. void __fastcall TForm1::Button2Click(TObject *Sender)
  22. {
  23.   sndPlaySound(NULL,SND_ASYNC);
  24. }
  25. //---------------------------------------------------------------------------