Can anyone give me an example how to create my own titlebar by handling the WM_NCPAINT message ?

Posted on 2002-04-30 11:11:03 by yoursguideline
I've never handled this message before, but i would expect it to be like WM_PAINT (except for a region to do gdi on).

This is not the answer, but if you looking at custom windows, look at Ernie's little tutorial on his kitchen timer, here.
Posted on 2002-04-30 11:56:05 by NaN
Posted on 2002-04-30 12:05:00 by yoursguideline
Let me tell you, a custom title bar is no small task. Alot of it depends on if you want a true custom title bar or if you dont mind faking it. It is much easier to create a blank pop up window and draw a custom one on the top of it than to try and over write the standard real one. However if you want help with the API side of things, I would be glad to lend assistance.

Some minor differences between the different paints are umm, you have to use GetWindowDC and not GetDC. GetDC gets the DC for the client area where GetWindowDC gets everything. And also I believe that the coordinate system changes from zero based to screen based. Other than that not much difference.
Posted on 2002-04-30 14:59:16 by Graebel