How to set a palette for MDI form?

How to set a palette for MDI form?

Post by Diego Pianaros » Thu, 06 Jan 2000 04:00:00



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.

Thanks.

Diego Pianarosa

 
 
 

How to set a palette for MDI form?

Post by Tom E » Thu, 06 Jan 2000 04:00:00


Assign a picture containing the appropriate palette to its Picture
property. You can use a 1x1 pixel picture if you don't want it to be
visible (or noticable at least).



>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.

>Thanks.

>Diego Pianarosa


-Tom
(please post replies to the newsgroup)

 
 
 

1. Trouble creating Logical Palettes in MDI forms (read this one)

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?

many thanks,

bri

2. Raytracing a sphere with a solid texture

3. Trouble creating Logical Palettes in MDI forms

4. Transparent color in selected areas..

5. Get and Set Z order for MDI forms in VB5

6. Please Help!!!

7. Setting palette for form and it's controls

8. TheAngel's Highway - Eric Knight Holbrook - 1024x 663 (108k)

9. MDI Form, ZOrder of Componets vrs MDIchild forms

10. How to set palette on JPEG and save that palette

11. Mdi forms and control box

12. Mdi Form in full screen

13. How to refresh/repaint a MDI form in VB