X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6c9a19aabab3a878b565e6c2a5f2a3824277c4dc..2a78ba63c10ba7d9e4d004c747e99888680e50cf:/src/msw/wave.cpp diff --git a/src/msw/wave.cpp b/src/msw/wave.cpp index abb89060fb..1ee0083801 100644 --- a/src/msw/wave.cpp +++ b/src/msw/wave.cpp @@ -9,7 +9,7 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "wave.h" #endif @@ -30,7 +30,6 @@ #include "wx/msw/wave.h" #include "wx/msw/private.h" -#include #include #if defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__) @@ -70,7 +69,7 @@ bool wxWave::Create(const wxString& fileName, bool isResource) m_isResource = TRUE; HRSRC hresInfo; -#if defined(__WIN32__) && !defined(__TWIN32__) +#if defined(__WIN32__) #ifdef _UNICODE hresInfo = ::FindResourceW((HMODULE) wxhInstance, fileName, wxT("WAVE")); #else @@ -102,7 +101,7 @@ bool wxWave::Create(const wxString& fileName, bool isResource) m_waveLength = (int) fileWave.Length(); - m_waveData = (wxByte*)::GlobalLock(::GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE, m_waveLength)); + m_waveData = (wxByte*)GlobalLock(GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE, m_waveLength)); if (!m_waveData) return FALSE; @@ -117,7 +116,7 @@ bool wxWave::Create(int size, const wxByte* data) Free(); m_isResource = FALSE; m_waveLength=size; - m_waveData = (wxByte*)::GlobalLock(::GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE, m_waveLength)); + m_waveData = (wxByte*)GlobalLock(GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE, m_waveLength)); if (!m_waveData) return FALSE; @@ -143,20 +142,24 @@ bool wxWave::Free() { if (m_waveData) { -#ifdef __WIN32__ - HGLOBAL waveData = ::GlobalHandle(m_waveData); +#ifdef __WXWINCE__ + HGLOBAL waveData = (HGLOBAL) m_waveData; +#elif defined(__WIN32__) + HGLOBAL waveData = GlobalHandle(m_waveData); #else HGLOBAL waveData = GlobalPtrHandle(m_waveData); #endif if (waveData) { - if (m_isResource) +#ifndef __WXWINCE__ + if (m_isResource) ::FreeResource(waveData); else +#endif { - ::GlobalUnlock(waveData); - ::GlobalFree(waveData); + GlobalUnlock(waveData); + GlobalFree(waveData); } m_waveData = NULL;