Does anyone know which API that Windows uses to draw the window title in Win 7(Aero theme) and Win 8? I've tried to check with API Monitor tool, but don't see any API to draw the title.
Please advise.
Thanks.
Does anyone know which API that Windows uses to draw the window title in Win 7(Aero theme) and Win 8? I've tried to check with API Monitor tool, but don't see any API to draw the title.
Please advise.
Thanks.
It's been a long time since I did these things, but just googling it (three search phrase attempts) I ended up at DrawFrameControl.
Disclaimer: haven't tested.
Update: as noted in the comments DrawFrameControl
won't do the job. And simple testing indicates that neither will DrawCaption
. Apparently one has to use the theme functionlity, for which I found an example of drawing a window caption at (http://msdn.microsoft.com/en-us/library/windows/desktop/bb688195%28v=vs.85%29.aspx#appendixb). Essentially this code uses GetThemeSysFont
to obtain the caption font and then DrawThemeTextEx
to draw the caption.
New disclaimer: haven't tested the GetThemeSysFont
plus DrawThemeTextEx
combo, since this turned into quite a bit of work!