小生最近编一个"关盘启动软件安装向导"对话框. 该对话框是基于"Windows窗体应用程序"编的. 
    小生想实现如下功能:用户把鼠标放到Label控件上时系统自动播放"按钮声音.wav"以示提醒安装指定软件.
    请问列位高手怎么实现???(就是用什么函数来激活wav声音文件?) 谢谢!

解决方案 »

  1.   

    PlaySound
    The PlaySound function plays a sound specified by the given filename, resource, or system event. (A system event may be associated with a sound in the registry or in the WIN.INI file.) BOOL PlaySound(
      LPCSTR pszSound,  
      HMODULE hmod,     
      DWORD fdwSound    
    );
      

  2.   

    void CTestDlg::OnMouseMove(UINT nFlags, CPoint point) 
    {
    CRect rc;
    GetDlgItem(IDC_STATIC1)->GetClientRect(rc);
    if (rc.PtInRect(point))
    sndPlaySound("C:\\t.wav,SND_NODEFAULT)
    CDialog::OnMouseMove(nFlags, point);
    }
      

  3.   

    i_noname(晚九朝五):您好!
        可我的程序是基于"Windows窗体应用程序"的,就是托管那个.sndPlaySound在那不能用 请问怎么解决?谢谢!