I'm writing a toy text editor and I'd like it to display colored characters.
So I've got a monochrome bitmap with an ascii font loaded into a device context (>8 bit color depth).

When I blit from this bitmap into my client area device context,
the characters appear black&white as they should.
What's the easiest way to have colored characters (each char one of say 256 colors) on my client area?

I've tried a few variations of the following with no luck:
I set up an 8-bit-wide back buffer, blitted the chars into it, modified palette entries 0/1 of the back buffer and blitted from
the back buffer onto the client area.
I've also tried to use the MERGECOPY ROP and a solid colored Pattern with my BitBlt instruction, but this seems soo complicated...

I wonder how this is actually done right...
Posted on 2002-03-06 02:25:09 by Odolo
Just in case someone had the same question:
- load the monochrome bmp
- SetTextColor / SetBkColor the 32-bit window context
- blit
color 0 of the monochrome will turn
color 1 will be text color
Posted on 2002-03-06 05:11:02 by Odolo