+ wxPaletteRefData(int n,
+ const unsigned char *red,
+ const unsigned char *green,
+ const unsigned char *blue)
+ {
+ Init();
+
+ LOGPALETTE *pPal = Alloc(n);
+ if ( !pPal )
+ return;
+
+ for ( int i = 0; i < n; i++ )
+ {
+ pPal->palPalEntry[i].peRed = red[i];
+ pPal->palPalEntry[i].peGreen = green[i];
+ pPal->palPalEntry[i].peBlue = blue[i];
+ pPal->palPalEntry[i].peFlags = 0;
+ }
+
+ m_hPalette = ::CreatePalette(pPal);
+ free(pPal);
+ }