salut tous le monde lorsque j'execute ce programme on me donne ses erreur
#include <Windows.h>
#include <mmsystem.h>
#include "resource.h"
HINSTANCE hInst;
LRESULT CALLBACK MainProc(HWND Dlg,UINT message,WPARAM wParam,LPARAM lParam);
int APIENTRY WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nCmdShow)
{
hInst=hInstance;
DialogBox(hInstance,(LPCTSTR)IDD_MAIN,NULL,(DLGPROC)MainProc);
return 0;
}
LRESULT CALLBACK MainProc(HWND Dlg,UINT message,WPARAM wParam,LPARAM lParam)
{
int Select;
char buf[MAX_PATH];
OPENFILENAME DlgInfs;
switch(message)
{
case WM_COMMAND:
Select=LOWORD(wParam);
switch(Select)
{
case IDC_PARCOURIR:
memset(&DlgInfs,0,sizeof(OPENFILENAME));
DlgInfs.lStructSize=sizeof(OPENFILENAME);
DlgInfs.hwndOwner=Dlg;
DlgInfs.hInstance=hInst;
DlgInfs.lpstrFilter="Fichiers WAV*.WAV";
DlgInfs.lpstrFile=buf;
DlgInfs.nMaxFile=MAX_PATH;
DlgInfs.lpstrTitle="Choisissez le fichier à lire.";
DlgInfs.Flags=OFN_PATHMUSTEXIST|OFN_FILEMUSTEXIST;
if(GetOpenFileName(&DlgInfs))
SetDlgItemText(Dlg,IDC_NOMDEFICHIER,buf);
return TRUE;
case IDC_LIRE:
GetDlgItemText(Dlg,IDC_NOMDEFICHIER,buf,MAX_PATH);
sndPlaySound(buf,SND_ASYNC);
return TRUE;
case IDCANCEL:
sndPlaySound(NULL,NULL);
EndDialog(Dlg,0);
return TRUE;
}
default:
return FALSE;
}
}
voila les erreurs:
Linking...
MAIN.OBJ : error LNK2001: unresolved external symbol __imp__sndPlaySoundA@8
Debug/projet5.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
merci d avance