C++ (WinForms) Play .wav file from resource

Hey,


im trying to play a .wav sound from my resources in c++.

works with PlaySound() in console app.

but i cant figure out how to play the sound in winformsapp.

tryed a few things out but it wont work. google didnt help me that much...

i hope someone has any idea how to get this working in winformsapp!

thanks in advance
I made a form app some time ago. I looked up the source code and it has a playsound function that functions properly using a wav resource:
PlaySound(MAKEINTRESOURCE(IDR_WAVE1), GetModuleHandle(0), SND_RESOURCE | SND_ASYNC);

It appears immediately after this code:
1
2
3
4
5
6
7
public ref class Form2 : public System::Windows::Forms::Form
	{
		static int TimeCounter = 0;
	public:
		Form2(void)
		{
			InitializeComponent();

Sorry if this is of no help!
Topic archived. No new replies allowed.