X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5ea105e0ba20c15e4d83f829e1c4faeb0a4952f0..2d2c394b59407ca3780a92a28ab12f63489c9cb1:/src/msw/palette.cpp diff --git a/src/msw/palette.cpp b/src/msw/palette.cpp index 77569777f7..7d88c7fe72 100644 --- a/src/msw/palette.cpp +++ b/src/msw/palette.cpp @@ -30,9 +30,7 @@ #include "assert.h" -#if !USE_SHARED_LIBRARIES IMPLEMENT_DYNAMIC_CLASS(wxPalette, wxGDIObject) -#endif /* * Palette @@ -64,7 +62,7 @@ wxPalette::~wxPalette(void) // FreeResource(TRUE); } -bool wxPalette::FreeResource(bool force) +bool wxPalette::FreeResource(bool WXUNUSED(force)) { if ( M_PALETTEDATA && M_PALETTEDATA->m_hPalette) { @@ -77,10 +75,10 @@ bool wxPalette::Create(int n, const unsigned char *red, const unsigned char *gre { UnRef(); -#ifdef __WXWINE__ +#if defined(__WXWINE__) || defined(__WXMICROWIN__) return (FALSE); - + #else m_refData = new wxPaletteRefData; @@ -104,20 +102,27 @@ bool wxPalette::Create(int n, const unsigned char *red, const unsigned char *gre M_PALETTEDATA->m_hPalette = (WXHPALETTE) CreatePalette((LPLOGPALETTE)npPal); LocalFree((HANDLE)npPal); return TRUE; - + #endif } int wxPalette::GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const { +#ifdef __WXMICROWIN__ + return FALSE; +#else if ( !m_refData ) return FALSE; return ::GetNearestPaletteIndex((HPALETTE) M_PALETTEDATA->m_hPalette, PALETTERGB(red, green, blue)); +#endif } bool wxPalette::GetRGB(int index, unsigned char *red, unsigned char *green, unsigned char *blue) const { +#ifdef __WXMICROWIN__ + return FALSE; +#else if ( !m_refData ) return FALSE; @@ -133,6 +138,7 @@ bool wxPalette::GetRGB(int index, unsigned char *red, unsigned char *green, unsi return TRUE; } else return FALSE; +#endif } void wxPalette::SetHPALETTE(WXHPALETTE pal)