X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7b46ecac6415b5c9d76bfca160163aa5dbfd0256..520e470fdd0daef09c77938db642e4583933c90d:/src/msw/bitmap.cpp diff --git a/src/msw/bitmap.cpp b/src/msw/bitmap.cpp index a7c0cb8e1d..44099f7598 100644 --- a/src/msw/bitmap.cpp +++ b/src/msw/bitmap.cpp @@ -36,7 +36,7 @@ #include "assert.h" -#if USE_XPM_IN_MSW +#if wxUSE_XPM_IN_MSW #define FOR_MSW 1 #include "../../contrib/wxxpm/libxpm.34b/lib/xpm34.h" #endif @@ -84,8 +84,6 @@ wxList wxBitmap::sm_handlers; wxBitmap::wxBitmap(void) { - m_refData = NULL; // new wxBitmapRefData; - if ( wxTheBitmapList ) wxTheBitmapList->AddBitmap(this); } @@ -170,7 +168,7 @@ wxBitmap::wxBitmap(const wxString& filename, long type) wxTheBitmapList->AddBitmap(this); } -#if USE_XPM_IN_MSW +#if wxUSE_XPM_IN_MSW // Create from data wxBitmap::wxBitmap(const char **data, wxItem *WXUNUSED(anItem)) { @@ -396,7 +394,7 @@ wxBitmap wxBitmap::GetBitmapForDC(wxDC& dc) const LPBITMAPINFO lpDib; void *lpBits = NULL; - wxASSERT( this->GetPalette() && this->GetPalette()->Ok() && (this->GetPalette()->GetHPALETTE() != NULL) ); + wxASSERT( this->GetPalette() && this->GetPalette()->Ok() && (this->GetPalette()->GetHPALETTE() != 0) ); tmpBitmap.SetPalette(this->GetPalette()); memDC.SelectObject(tmpBitmap); @@ -644,7 +642,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxBMPFileHandler, wxBitmapHandler) bool wxBMPFileHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags, int desiredWidth, int desiredHeight) { -#if USE_IMAGE_LOADING_IN_MSW +#if wxUSE_IMAGE_LOADING_IN_MSW wxPalette *palette = NULL; bool success = FALSE; /* @@ -668,7 +666,7 @@ bool wxBMPFileHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long fla bool wxBMPFileHandler::SaveFile(wxBitmap *bitmap, const wxString& name, int type, const wxPalette *pal) { -#if USE_IMAGE_LOADING_IN_MSW +#if wxUSE_IMAGE_LOADING_IN_MSW wxPalette *actualPalette = (wxPalette *)pal; if (!actualPalette && (!M_BITMAPHANDLERDATA->m_bitmapPalette.IsNull())) actualPalette = & (M_BITMAPHANDLERDATA->m_bitmapPalette); @@ -698,7 +696,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxXPMFileHandler, wxBitmapHandler) bool wxXPMFileHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags, int desiredWidth, int desiredHeight) { -#if USE_XPM_IN_MSW +#if wxUSE_XPM_IN_MSW XImage *ximage; XpmAttributes xpmAttr; HDC dc; @@ -740,7 +738,7 @@ bool wxXPMFileHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long fla bool wxXPMFileHandler::SaveFile(wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette) { -#if USE_XPM_IN_MSW +#if wxUSE_XPM_IN_MSW HDC dc = NULL; Visual *visual = NULL; @@ -790,7 +788,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxXPMDataHandler, wxBitmapHandler) bool wxXPMDataHandler::Create(wxBitmap *bitmap, void *data, long flags, int width, int height, int depth) { -#if USE_XPM_IN_MSW +#if wxUSE_XPM_IN_MSW XImage *ximage; int ErrorStatus; XpmAttributes xpmAttr;