I am trying to figure out how to draw a custom button on the window title bar when using the Aero theme in Vista or Win7. I need to apply this to a number of different applications without changing the source code, so this will be a hook procedure. Since I cannot change the source code, I cannot use DwmExtendFrameIntoClientArea.
I am sure that this can be done, or at least faked very well, because I saw an application that can do this. I looked at the various windows quite carefully while this other application was working, and I do not believe that they change the style of the window or expand the frame in the client area.
As a test, I tried using the WM_NCPAINT message to draw something in the title bar. When the Aero theme is active, nothing will appear. If I get DC for the whole screen, and not just from the window, then I can "draw" on the panel of labels, but, of course, it really is painted on the screen. There are all kinds of problems with this approach, so this does not work. If anyone has any good ideas or even good tips, I am very grateful for the help!
source
share