You can use CDC::FromHandle() to get a temporary object for immediate use. Alternatively, you can CDC::Attach() to keep a more permanent CDC object around. You should make sure you release a device context (DC) when you're done using it (FromHandle sort of automatically handles this situation by going out of scope).
If you have CWnds, you can also get a pointer to an existing CDC with CWnd::GetDC().
There is a lot of info on drawing in GDI online, I suggest you read up on it.
I can only assume that something has been corrupted somewhere. But as I said before, it's impossible to guess what. Your only chance is to collect all the information that you can, and report it to Microsoft.
"You may use a custom drawn scroll bar or handle WM_CTLCOLOR when you only need to change the background"
I already tried that ... if I override WM_CTLCOLOR I could color everything, except scrollbars ...
"Searching the web may give you some solutions. The article http://www.drdobbs.com/windows/developing-a-custom-windows-scrollbar-in/184416659[^] is rather old but contains a good introduction and shows how to implement a custom drawn scroll bar."
I saw that article, but is about replacing the original scrollbar with CScrollBarEx control ... well, in this case I will front with 2 issues: hiding the original scrollbar, and second, synchronize the listctrl with CScrollbarEx control ... I think that is the longest road ... and the hardest ...
I thought that trying to use DrawThemeBackground I could change the scrollbars colors ... I am working on that for weeks ... I have to dig in ...
Last Visit: 31-Dec-99 19:00 Last Update: 26-Jan-15 1:28