X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/57c208c5759da71a637f0f0f5b7d3dc3eda09c02..342751763793b5cdad252d731aac0618d0674e5b:/src/msw/wave.cpp diff --git a/src/msw/wave.cpp b/src/msw/wave.cpp index 805a64fa0e..8f2edf9af5 100644 --- a/src/msw/wave.cpp +++ b/src/msw/wave.cpp @@ -31,15 +31,17 @@ #include #include -#ifndef __GNUWIN32__ +#if !defined( __GNUWIN32__ ) || defined(wxUSE_NORLANDER_HEADERS) #include #endif #ifndef __TWIN32__ #ifdef __GNUWIN32__ +#ifndef wxUSE_NORLANDER_HEADERS #include "wx/msw/gnuwin32/extra.h" #endif #endif +#endif wxWave::wxWave() : m_waveData(NULL), m_waveLength(0), m_isResource(FALSE) @@ -73,9 +75,13 @@ bool wxWave::Create(const wxString& fileName, bool isResource) HRSRC hresInfo; #if defined(__WIN32__) && !defined(__TWIN32__) - hresInfo = ::FindResourceA((HMODULE) wxhInstance, fileName, "WAVE"); +#ifdef _UNICODE + hresInfo = ::FindResourceW((HMODULE) wxhInstance, fileName, wxT("WAVE")); +#else + hresInfo = ::FindResourceA((HMODULE) wxhInstance, fileName, wxT("WAVE")); +#endif #else - hresInfo = ::FindResource((HMODULE) wxhInstance, fileName, "WAVE"); + hresInfo = ::FindResource((HMODULE) wxhInstance, fileName, wxT("WAVE")); #endif if (!hresInfo) return FALSE; @@ -129,7 +135,7 @@ bool wxWave::Play(bool async, bool looped) const return FALSE; #ifdef __WIN32__ - return ( ::PlaySound((LPCSTR)m_waveData, NULL, SND_MEMORY | + return ( ::PlaySound((LPCTSTR)m_waveData, NULL, SND_MEMORY | SND_NODEFAULT | (async ? SND_ASYNC : SND_SYNC) | (looped ? (SND_LOOP | SND_ASYNC) : 0)) != 0 ); #else return ( ::sndPlaySound((LPCSTR)m_waveData, SND_MEMORY |