X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3dece6c4bc6b3952cf2e3c77ca52081a443677be..9d7d3b1f9faf5116b2f1d5a95493054e88039775:/src/msw/statbmp.cpp?ds=sidebyside diff --git a/src/msw/statbmp.cpp b/src/msw/statbmp.cpp index f1f3fcee47..c321fe5f73 100644 --- a/src/msw/statbmp.cpp +++ b/src/msw/statbmp.cpp @@ -273,12 +273,12 @@ void wxStaticBitmap::SetImageNoCopy( wxGDIImage* image) m_isIcon ? IMAGE_ICON : IMAGE_BITMAP, (LPARAM)handle); // detect if this is still the handle we passed before or // if the static-control made a copy of the bitmap! - if (m_currentHandle != 0 && oldHandle != m_currentHandle) + if (m_currentHandle != 0 && oldHandle != (HGDIOBJ) m_currentHandle) { // the static control made a copy and we are responsible for deleting it - DeleteObject(oldHandle); + DeleteObject((HGDIOBJ) oldHandle); } - m_currentHandle = (HGDIOBJ)handle; + m_currentHandle = (WXHANDLE)handle; #endif // Win32 if ( ImageIsOk() )