How can I paint the border and caption of a window?? A small example would rock. I mean, I get the DC and I try to paint but it doesn't work like the WM_PAINT ...
How can I paint the border and caption of a window?? A small example would rock. I mean, I get the DC and I try to paint but it doesn't work like the WM_PAINT ...
If you are using GetDCEx as described in msdn's WM_NCCREATE page then that may be the problem. Apparently, there is an undocumented flag for GetDCEx which is discussed on this page ("Undocumented flags for GetDCEx").
CProgramming FAQ
Caution: this person may be a carrier of the misinformation virus.
Well I've tried but it just overwrites what I've done on the DC! If I move it off screen and on quickly it goes all garbled!
How can I stop it reseting my changes?
Bingo!
How I did it --
Windows paints over it right? So let it! As soon as it hits WM_NCPAINT send it through DefWindowProc..
ie -- DefWindowProc( hwnd, msg, wParam, lParam );
After that you are free to just do whatever you want.
[edit:] Oh, and use GetWindowDC().
Last edited by Mithoric; 03-11-2004 at 10:51 AM.