- }
- ::SelectObject(srcDC, 0);
- ::DeleteDC(srcDC);
- ::SelectObject(destDC, 0);
- ::DeleteDC(destDC);
- return TRUE;
-}
-
-/*
- * wxBitmapHandler
- */
-
-IMPLEMENT_DYNAMIC_CLASS(wxBitmapHandler, wxObject)
-
-bool wxBitmapHandler::Create(wxBitmap *bitmap, void *data, long type, int width, int height, int depth)
-{
- return FALSE;
-}
-
-bool wxBitmapHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long type,
- int desiredWidth, int desiredHeight)
-{
- return FALSE;
-}
-
-bool wxBitmapHandler::SaveFile(wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette)
-{
- return FALSE;
-}
-
-/*
- * Standard handlers
- */
-
-class WXDLLEXPORT wxBMPResourceHandler: public wxBitmapHandler
-{
- DECLARE_DYNAMIC_CLASS(wxBMPResourceHandler)
-public:
- inline wxBMPResourceHandler(void)
- {
- m_name = "Windows bitmap resource";
- m_extension = "";
- m_type = wxBITMAP_TYPE_BMP_RESOURCE;
- };
-
- virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
- int desiredWidth, int desiredHeight);
-};
-IMPLEMENT_DYNAMIC_CLASS(wxBMPResourceHandler, wxBitmapHandler)
-
-bool wxBMPResourceHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
- int desiredWidth, int desiredHeight)
-{
- // TODO: load colourmap.
- M_BITMAPHANDLERDATA->m_hBitmap = (WXHBITMAP) ::LoadBitmap(wxGetInstance(), name);
- if (M_BITMAPHANDLERDATA->m_hBitmap)