+ wxPaletteRefData(int n,
+ unsigned char *red,
+ unsigned char *green,
+ 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);
+ }