How would I draw outside the client area of a window, and on the title bar. I know it can be done, but I am unsure of how to implement this effectively. Think google chrome, where the tabs are on the title bar.
+2
A:
When Windows asks you to draw the portion of the window that is outside your client area, it will send you an WM_NCPAINT message. Handle that message and draw whatever you want the non-client portion of your window to be. See the page I linked for an example of how to get a device context you can draw upon.
Jim Brissom
2010-09-06 06:15:52
hmm, it seems to really mess up the drawing (mostly the menu). Is there something I'm missing? (I copied the example into my winProc and made it draw a rectangle.)
Alexander Rafferty
2010-09-06 06:33:42
+1
A:
It may be worth mentioning WM_NCHITTEST also, if you plan on customizing where non-client elements are located.
tenfour
2010-09-06 06:18:06