How can i set a palette different from vb's standard palette?
A normal form have the palette property, but MDI form doesn't have.
sorry for the dual post...
I have the following code to specify a 256 color grayscale palette in an SDI form and it works fine.
TLogPalette *grayPal = new TLogPalette;
grayPal->palVersion = 0x300;
grayPal->palNumEntries = 256;
for (int i=0; i<256; i++)
grayPal->palPalEntry[i].peRed = i;
// same for green and blue
grayPal->palFlags[i] = 0;
// assign the palette using CreatePalette...
like i said, this works fine in a SDI app, but in an MDI app, it craps out with access violations. If i comment out that for loop
in my MDI app, the errors disappear, but then again, so does my palette. What am i dooing wrong?