I am writing an Active-X control which is basically a charting package. All lines have user-defineable colours and under 65536 colours all colours appear correctly. However, under 256 colours all non-solid colours are approximated by windows.
I have gone about creating a logical palette, have copied all default colours into it (enumerating solid pens), have selected the palette into the DC and have realised the palette. This happens initially.
When a new pen colour is added, the palette is resized, the new colour added and the palette realised. This is all as per the Win32 SDK docs.
The problem is that the new colours are *still* approximated to one of the solid colours in the default palette, even though I have selected a logical palette into the DC.
Any ideas?? Could this be a problem with Active-X controls??