Don't use Windows handles directly in headers

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36991 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2006-01-19 07:37:18 +00:00
parent df311d21f5
commit 4fe41ce625
2 changed files with 5 additions and 4 deletions

View File

@@ -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() )