Compiler error "Undefined reference to PlaySoundA@12", i thought this function was included in the header <windows.h>? or is it included in another library?
anyway here is my code..
1 2 3 4 5 6 7 8 9 10 11 12
LRESULT CALLBACK WindowProcedure (HWND handle, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message) /* handle the messages */
{
case WM_CREATE:
PlaySound ("Misfortune.gb", NULL, SND_FILENAME); /*Misfortune.gb is the name of the wav file */
return 0;
}
}
Did you (eventually) check the MSDN entry for PlaySound ?? Whenever you start working with a new API calls, it's a good idea to check the documentation on it!