wxWidgets目前用的人不算太多,相关的资料也比较少,准备慢慢的把工作中所用到的一些代码片段贴上来,权且作为备忘吧.
comm.h
#ifndef PICTUREPROC_H_INCLUDED
#define PICTUREPROC_H_INCLUDED
const char soundFiles[100]="sound/main.wav";
#endif // PICTUREPROC_H_INCLUDED
testMain.cpp
//播放音乐
void testFrame::PlayMusic()
{
//格式化字符为UTF格式并创建wxString字符串对象
wxString soundString(soundFiles,wxConvUTF8);
//创建wxSound对象
wxSound sound;
sound.Create(soundString,false);
sound.Play(true);
}
from:http://axiii.blog.51cto.com/396236/107830