added wxUSE_PALETTE and fixed compilation with it set to 0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11749 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -708,12 +708,14 @@ bool wxLoadIntoBitmap(wxChar *filename, wxBitmap *bitmap, wxPalette **pal)
|
||||
|
||||
if (hPalette)
|
||||
{
|
||||
#if wxUSE_PALETTE
|
||||
if (pal)
|
||||
{
|
||||
*pal = new wxPalette;
|
||||
(*pal)->SetHPALETTE((WXHPALETTE) hPalette);
|
||||
}
|
||||
else
|
||||
#endif // wxUSE_PALETTE
|
||||
DeleteObject(hPalette);
|
||||
}
|
||||
else if (pal)
|
||||
@@ -928,8 +930,10 @@ HANDLE wxBitmapToDIB (HBITMAP hBitmap, HPALETTE hPal)
|
||||
bool wxSaveBitmap(wxChar *filename, wxBitmap *bitmap, wxPalette *colourmap)
|
||||
{
|
||||
HPALETTE hPalette = 0;
|
||||
#if wxUSE_PALETTE
|
||||
if (colourmap)
|
||||
hPalette = (HPALETTE) colourmap->GetHPALETTE();
|
||||
#endif // wxUSE_PALETTE
|
||||
|
||||
HANDLE dibHandle = wxBitmapToDIB((HBITMAP) bitmap->GetHBITMAP(), hPalette);
|
||||
if (dibHandle)
|
||||
|
Reference in New Issue
Block a user