Desktop-as-a-Service Designed for Any Cloud ? Nutanix Frame

Click here for larger image


This small control will help you if you want to draw wave file in your applications. This control can open ,play and draw any wave file saved in wave format but saved without any compression ( PCM Format ).


Note that this is not an ActiveX control. It is an MFC class. You can add it in your project and use it as you use any MFC class at runtime mode. You can use it with any type of projects like SDI and MDI or dialog based applications with this article a demo project that will help u to use this control. Also don't forgot to mail me if u faced any problem with control or to send your suggestion to me.

Thanks For Using My Code!!


Download source - 7 Kb
Download demo project - 36 Kb


  • should change a little

    Posted by vinhie47 on 03/22/2007 10:11pm

    This code is so interesting. It's the code I need. But I think the code should change a little by replacing [b]lpvFile=::MapViewOfFile(m_hMap,FILE_MAP_READ,0,0,0);[/b] instead of [b]LPVOID lpvFile=::MapViewOfFile(m_hMap,FILE_MAP_READ,0,0,0);[/b] This will avoid some error when someone open a large file (certain hundred of MB) two times. Regards,

  • Some Help.

    Posted by Legacy on 06/10/2003 07:00am

    Originally posted by: Lee

    I am interested in using your project but would like to know the functions of the .cpp


    I am a beginner in MFC & would appreciate some help.
    I am trying to understand the code but is experiencing some hair splitting moments. Please help me.

  • about time ruler

    Posted by Legacy on 02/25/2003 08:00am

    Originally posted by: BrianBin

    I marked the DrawTimeRuler() at the OnPaint(),
    Why does it still draws the ruler?
    and the stack arround the variable a is not

  • one run-time erro ....

    Posted by Legacy on 02/17/2003 08:00am

    Originally posted by: Brian Bin

    when I finished building the project(demo)
    and executed indebug level.
    I tried to import a file of speech (*.wav)
    before it comes out anything, it appears
    " stack arround variable a was corrupted "
    at the function:
    void CWaveViewCtrl::DrawTimeRuler(CPaintDC* PaintDC)
    in line 299 ....
    Can you help me about this?

  • Whats wrong with DBSCAPS_CTRLDEFAULT

    Posted by Legacy on 02/16/2003 08:00am

    Originally posted by: Brian Bin

    I have downloaded the demo project source...
    and I tried to compile it under visual studio .net
    It showed some error messages like this:

    d:\Doc\Visual Studio Projects\DSound\WaveFile\CWaveFile.CPP(346): error C2065: 'DSBCAPS_CTRLDEFAULT' : Undeclared Identifier!

    someone would please tell me what's going on?
    and how to do? Thank you very much.

    • DBSCAPS_CTRLDEFAULT was removed from DirectX

      Posted by kberson on 11/29/2006 10:58pm

      DBSCAPS_CTRLDEFAULT was defined in dsound.h and was removed from the newer releases.
      Just replace it with 

  • What is username and password for Sourcesafe...?

    Posted by Legacy on 01/10/2003 08:00am

    Originally posted by: Oceana

    i can`t open your source. Please teach me your username and password for Sourcesafe...

  • Good Job !!

    Posted by Legacy on 06/28/2002 07:00am

    Originally posted by: Chris

    Your article and source codes are of great help for me. Thank you !

  • Good Work :)

    Posted by Legacy on 06/22/2002 07:00am

    Originally posted by: Hasan Yasar Kazmi

    Ur artice was really useful, i am thankful to u for such a good article and code

  • write back a wave file to the harddisk after changing it

    Posted by Legacy on 05/22/2002 07:00am

    Originally posted by: bin bin

    Dear Mohammed:
    I'm grateful for your providing a good example for us.
    I want to know how to write back the wave file to the harddisk after changing some samples of it.Would you please
    tell me how to realize it?
    Thank you
    bin bin

  • How to Store 16 Bit PCM Wave

    Posted by Legacy on 05/06/2002 07:00am

    Originally posted by: Maria Jothi

    Hello Sir,

    My Query is Regarding PCM wave of 16 bits.

    After Recording , lpData of WAVEHDR contains the data.

    I had copied the lpData to char *buffer.

    Now , I need to store the data in a file.
    After writing Header information , I stored the data in the file as char (bytes by bytes).

    This works fine for 8 bit (both mono & stereo).

    I followed the same method for 16 bit .When I play the stored file ,noise also comes along with the recorded data .

    I read from some articles related to WAVE and came to know that 16 bit should be stored as short..
    If so , How can i store it ???

    Else , If you have someother idea,Please throw light on it.


  • Loading, Please Wait ...

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date