#ifndef WX_PRECOMP
#include "wx/setup.h"
#include "wx/defs.h"
+#include "wx/bitmap.h"
#endif
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
-#ifndef __MWERKS__
+
+#if !defined(__MWERKS__) && !defined(__SALFORDC__)
#include <memory.h>
#endif
#include "wx/msw/dib.h"
+#ifndef __TWIN32__
#ifdef __GNUWIN32__
#include "wx/msw/gnuwin32/extra.h"
#endif
+#endif
#ifndef SEEK_CUR
/* flags for _lseek */
dwLen = bi.biSize + PaletteSize(&bi);
- hdc = GetDC(NULL);
+ hdc = GetDC((HWND) NULL);
hpal = SelectPalette(hdc, hpal, FALSE);
RealizePalette(hdc);
GlobalUnlock(hdib);
hdib = NULL;
SelectPalette(hdc, hpal, FALSE);
- ReleaseDC(NULL, hdc);
+ ReleaseDC((HWND) NULL, hdc);
return NULL;
}
return((HPALETTE) GetStockObject(DEFAULT_PALETTE));
}
-bool wxLoadIntoBitmap(char *filename, wxBitmap *bitmap, wxColourMap **pal)
+bool wxLoadIntoBitmap(char *filename, wxBitmap *bitmap, wxPalette **pal)
{
HBITMAP hBitmap;
HPALETTE hPalette;
{
if (pal)
{
- *pal = new wxColourMap;
+ *pal = new wxPalette;
(*pal)->SetHPALETTE((WXHPALETTE) hPalette);
}
else
else return FALSE;
}
-wxBitmap *wxLoadBitmap(char *filename, wxColourMap **pal)
+wxBitmap *wxLoadBitmap(char *filename, wxPalette **pal)
{
wxBitmap *bitmap = new wxBitmap;
if (wxLoadIntoBitmap(filename, bitmap, pal))
return hDIB;
}
-bool wxSaveBitmap(char *filename, wxBitmap *bitmap, wxColourMap *colourmap)
+bool wxSaveBitmap(char *filename, wxBitmap *bitmap, wxPalette *colourmap)
{
HPALETTE hPalette = 0;
if (colourmap)