On windows the titlebar and the window frame is a part of the non-client area, this has its own set of events like WM_NCPAINT instead of WM_PAINT feks.
You can draw to this area by using GetWindowDC() and then replacing the window function so you can handle the individual messages.
This applies to controls injected into other applications as well.
here are some links that might help:
http://msdn.microsoft.com/en-us/library/ms534905(VS.85).aspx
http://msdn.microsoft.com/en-us/library/ms534830(VS.85).aspx
https://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3124108&SiteID=1
You can draw to this area by using GetWindowDC() and then replacing the window function so you can handle the individual messages.
This applies to controls injected into other applications as well.
here are some links that might help:
http://msdn.microsoft.com/en-us/library/ms534905(VS.85).aspx
http://msdn.microsoft.com/en-us/library/ms534830(VS.85).aspx
https://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3124108&SiteID=1