Draw on titlebar?

BlitzMax Forums/BlitzMax Programming/Draw on titlebar?

xlsior(Posted 2008) [#1]
I've seen some programs that can draw custom gadgets on a titlebar next to the minimize/maximize/close buttons (on Windows)

Does anyone know of a way or have any pointers on how to do this from within BlitzMax? So far I haven't been able to dig up any info on how to even start such a thing...

I would especially be interested in finding out if there's a way to add a gadget to an arbitrary hWnd belonging to external programs, and detect a click from within a BlitzMax application...


grable(Posted 2008) [#2]
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