Delphi vs. myPalette

Say I have a palette, "myPalette."

I want my Delphi app to always use myPalette (presuming I'm always in 8bit
video mode).

Now, I tried EVERYTHING to try to make Delphi maintain this palette.  I've
tried the following:

just before or after copying a DIB to a TImage.Picture.Bitmap on the form
(that DIB has the same color table as myPalette):

saveddc := SaveDc(form1.handle);
 TheHDC := GetDc(form1.handle);
 oldpal := SelectPalette(Thehdc, myPalette,false);
 numentries := RealizePalette(Thehdc);

as well as capturing the "WM_QueryNewPalette" and "WM_PaletteChanged"
messages to fire off events that select myPalette:

(declared privately)

procedure TForm1.QNewPalette(var Msg : TWMQueryNewPalette);
var
  i : Word;
  DC : HDC;
  HPold : HPalette;
begin
  DC := Form1.Handle;
  HPold := SelectPalette(DC, myPalette, False);
  i := RealizePalette(DC);
  SelectPalette(DC, HPold, False);
  if (i > 0) then InvalidateRect(Handle, Nil, False);
  Msg.Result := i;
end;

procedure TForm1.PalChanged(var Msg : TWMPaletteChanged);
var
  i : Word;
  DC : HDC;
  HPold : HPalette;
begin
  if (Msg.PalChg = Handle) then Msg.Result := 0
  else begin
    DC := Form1.Handle;
    HPold := SelectPalette(DC, myPalette, True);
    i := RealizePalette(DC);
    UpdateColors(DC);
    SelectPalette(DC, HPold, False);
  end;
end;

I have posted PaletteChanged(true) as well and...

I have also forced palette changing with SendMessage(form1.Handle,
WM_PALETTECHANGED , 0, 0); (or in addition WM_QUERYNEWPALETTE).

perhaps even:  SendMessage(ghostInMyMachine.Handle,
WM_USE_MY_FREAKING_PALETTE_PLEASE_!,0,0) --- (this one definately doesn't
work...)

No luck.  Delphi uses a palette that, while still contains the most of the
proper colors, does not contain the all the colors in the table, nor are the
in the proper order.

Is Delphi undermining my efforts to use my own palette?

Any help would be appreciated.

Thanks,
Rob Klause
Solutions By Design
rkla...@sbd.com