1. Home
  2. Knowledge Base
  3. How to programmatically play Screen Tap sound on Windows Mobile?

How to programmatically play Screen Tap sound on Windows Mobile?

Lots of sounds that we hear when using Windows Mobile and Windows CE devices are generated by the OS by playing .wav files. They are located in the Windows folder. You can use them in your program with a call to PlaySound API.

But the sound played when the screen is tapped is not a .wav file. Looking through Windows CE source code, I found that during OS image building two wave files tchsoft.wav and tchloud.wav are embedded into a waveapi.dll as resources.

Following is the code snippet to play the soft and loud Screen Tap sounds.

#define ID_WAVE_TCHLOUD 102
#define ID_WAVE_TCHSOFT 103

HMODULE hModule = LoadLibrary(L”waveapi.dll”);

Note: The identifier values or the logic might change in the future, so be careful to test it. In any case, you can look through the CE source code to know the latest implementation.

We hope many people will find this useful.

For more details on our products, click here 
If you need further assistance, please submit a ticket here

Was this helpful?
Updated on June 2021