X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ad81651f00edc6f489d9b6a0839d316a964fd521..8f974c520a8733158591891458fda10fae4c3950:/src/msw/palette.cpp diff --git a/src/msw/palette.cpp b/src/msw/palette.cpp index 891815bf74..7d88c7fe72 100644 --- a/src/msw/palette.cpp +++ b/src/msw/palette.cpp @@ -62,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) { @@ -75,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; @@ -102,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; @@ -131,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)