*******************************************************************************/
// For compilers that support precompilation, includes "wx.h".
-#define IN_WX_MAIN_CPP
#include "wx/wxprec.h"
#if defined(__BORLANDC__)
goto ErrExit;
}
- if (!(nNumColors = (WORD)lpbi->biClrUsed))
+ nNumColors = (WORD)lpbi->biClrUsed;
+ if ( nNumColors == 0 )
{
/* no color table for 24-bit, default size otherwise */
if (lpbi->biBitCount != 24)
lpInfo = (LPBITMAPINFOHEADER) GlobalLock(hDIB);
#endif
- if ((hPalette = MakeDIBPalette(lpInfo)))
+ hPalette = MakeDIBPalette(lpInfo);
+ if ( hPalette )
{
// Need to realize palette for converting DIB to bitmap.
hOldPal = SelectPalette(hDC, hPalette, TRUE);
** some good color choices.
*/
else
- return(GetStockObject(DEFAULT_PALETTE));
+ return((HPALETTE) GetStockObject(DEFAULT_PALETTE));
}
bool wxLoadIntoBitmap(char *filename, wxBitmap *bitmap, wxColourMap **pal)