I am using Visual C++ 2019 with MFC, on Windows 10 Home Premium. The video mode is 3840*2160 40-60 Hz (AMD FreeSync) 30 bit/pixel: 10 bit / color part, 1 073 741 824 colors.
I can give colors with COLORREF = unsigned int (32 bits), what is interpreted as (red | (green << 8) | (blue << 16)), this has only 16 777 216 colors. How can I give 1 073 741 824 colors? At now, 16M colors is converted to 1G colors. I need the method without conversion.
For example: CDC::SetPixel, FillSolidRect, SetTextColor, SetBkColor, Line, CPen/CBrush constructor, CBitmap, etc. Thank you.
(I want to save the time of conversion. For example, speed of key Page Up/Down in my own IDE is about 10 Hz, what is very slow. I generated the picture in the main memory (with CreateCompatibleBitmap, CreateCompatibleDC, BitBlt). When I drawed directly to the display, this was more slower. I tried SetBkMode OPAQUE and TRANSPARENT so, TextOut and DrawText so.)
COLORREF
supports only 8-bit (0-255) values, so aCOLORREF
supports up to 256x256x256 = 16,777,216 colors max. It simply can't go any higher. – Remy Lebeau