wxTheBitmapList->DeleteObject(this);
}
-bool wxBitmap::FreeResource(bool force)
+bool wxBitmap::FreeResource(bool WXUNUSED(force))
{
if ( !M_BITMAPDATA )
return FALSE;
}
// Create from XPM data
-wxBitmap::wxBitmap(char **data, wxItem *WXUNUSED(anItem))
+wxBitmap::wxBitmap(char **data, wxControl *WXUNUSED(anItem))
{
(void) Create((void *)data, wxBITMAP_TYPE_XPM_DATA, 0, 0, 0);
}
}
else
{
- HDC dc = GetDC(NULL);
+ HDC dc = GetDC((HWND) NULL);
M_BITMAPDATA->m_hBitmap = (WXHBITMAP) CreateCompatibleBitmap(dc, w, h);
- ReleaseDC(NULL, dc);
+ ReleaseDC((HWND) NULL, dc);
M_BITMAPDATA->m_depth = wxDisplayDepth();
}
if (M_BITMAPDATA->m_hBitmap)
while ( node )
{
wxBitmapHandler *handler = (wxBitmapHandler *)node->Data();
- if ( handler->GetName() == name )
+ if ( (handler->GetName().Cmp(name) == 0) )
return handler;
node = node->Next();
}
while ( node )
{
wxBitmapHandler *handler = (wxBitmapHandler *)node->Data();
- if ( handler->GetExtension() == extension &&
- (bitmapType == -1 || handler->GetType() == bitmapType) )
+ if ( (handler->GetExtension().Cmp(extension) == 0) &&
+ (bitmapType == -1 || (handler->GetType() == bitmapType)) )
return handler;
node = node->Next();
}
{
wxMemoryDC memDC;
wxBitmap tmpBitmap(this->GetWidth(), this->GetHeight(), dc.GetDepth());
- HPALETTE hPal = NULL;
+ HPALETTE hPal = (HPALETTE) NULL;
LPBITMAPINFO lpDib;
- void *lpBits = NULL;
+ void *lpBits = (void*) NULL;
/*
wxASSERT( this->GetPalette() && this->GetPalette()->Ok() && (this->GetPalette()->GetHPALETTE() != 0) );
IMPLEMENT_DYNAMIC_CLASS(wxBitmapHandler, wxObject)
-bool wxBitmapHandler::Create(wxBitmap *bitmap, void *data, long type, int width, int height, int depth)
+bool wxBitmapHandler::Create(wxBitmap *WXUNUSED(bitmap), void *WXUNUSED(data), long WXUNUSED(type), int WXUNUSED(width), int WXUNUSED(height), int WXUNUSED(depth))
{
return FALSE;
}
-bool wxBitmapHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long type,
- int desiredWidth, int desiredHeight)
+bool wxBitmapHandler::LoadFile(wxBitmap *WXUNUSED(bitmap), const wxString& WXUNUSED(name), long WXUNUSED(type),
+ int WXUNUSED(desiredWidth), int WXUNUSED(desiredHeight))
{
return FALSE;
}
-bool wxBitmapHandler::SaveFile(wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette)
+bool wxBitmapHandler::SaveFile(wxBitmap *WXUNUSED(bitmap), const wxString& WXUNUSED(name), int WXUNUSED(type), const wxPalette *WXUNUSED(palette))
{
return FALSE;
}
};
IMPLEMENT_DYNAMIC_CLASS(wxBMPResourceHandler, wxBitmapHandler)
-bool wxBMPResourceHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
- int desiredWidth, int desiredHeight)
+bool wxBMPResourceHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long WXUNUSED(flags),
+ int WXUNUSED(desiredWidth), int WXUNUSED(desiredHeight))
{
// TODO: load colourmap.
M_BITMAPHANDLERDATA->m_hBitmap = (WXHBITMAP) ::LoadBitmap(wxGetInstance(), name);
if (M_BITMAPHANDLERDATA->m_hBitmap)
{
- M_BITMAPHANDLERDATA->m_ok = TRUE;
- BITMAP bm;
- GetObject((HBITMAP) M_BITMAPHANDLERDATA->m_hBitmap, sizeof(BITMAP), (LPSTR) &bm);
- M_BITMAPHANDLERDATA->m_width = bm.bmWidth;
- M_BITMAPHANDLERDATA->m_height = bm.bmHeight;
- M_BITMAPHANDLERDATA->m_depth = bm.bmBitsPixel;
- return TRUE;
+ M_BITMAPHANDLERDATA->m_ok = TRUE;
+ BITMAP bm;
+ GetObject((HBITMAP) M_BITMAPHANDLERDATA->m_hBitmap, sizeof(BITMAP), (LPSTR) &bm);
+ M_BITMAPHANDLERDATA->m_width = bm.bmWidth;
+ M_BITMAPHANDLERDATA->m_height = bm.bmHeight;
+ M_BITMAPHANDLERDATA->m_depth = bm.bmBitsPixel;
+
+ if ( bitmap->IsKindOf(CLASSINFO(wxIcon)) )
+ {
+ }
+
+ return TRUE;
}
// it's probably not found
};
IMPLEMENT_DYNAMIC_CLASS(wxBMPFileHandler, wxBitmapHandler)
-bool wxBMPFileHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
- int desiredWidth, int desiredHeight)
+bool wxBMPFileHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long WXUNUSED(flags),
+ int WXUNUSED(desiredWidth), int WXUNUSED(desiredHeight))
{
#if wxUSE_IMAGE_LOADING_IN_MSW
wxPalette *palette = NULL;
#endif
}
-bool wxBMPFileHandler::SaveFile(wxBitmap *bitmap, const wxString& name, int type, const wxPalette *pal)
+bool wxBMPFileHandler::SaveFile(wxBitmap *bitmap, const wxString& name, int WXUNUSED(type), const wxPalette *pal)
{
#if wxUSE_IMAGE_LOADING_IN_MSW
wxPalette *actualPalette = (wxPalette *)pal;