From: 4N on
Hi,

I'm having an hard time to figure out how to draw a text on the titlebar of
a window under windows seven.
In the past , under XP, I used WM_NCPAINT and DrawText, but under seven this
doesn't work (no text at all is drawn).
I then tried using a code like follows

HTHEME hTheme = OpenThemeData(hWnd,L"WINDOW");
SetBkMode(hDC,TRANSPARENT);
DrawThemeTextEx(hTheme, hDC, WP_CAPTION, CS_ACTIVE, Text, -1,
DT_SINGLELINE|DT_LEFT|DT_VCENTER, &rc, &dttOpts);
CloseThemeData(hTheme);

but it doesn't print the text either.
How can I solve this problem?

Thanks in advance for any help.

From: nico on
4N wrote:
> Hi,
>
> I'm having an hard time to figure out how to draw a text on the titlebar
> of a window under windows seven.
> In the past , under XP, I used WM_NCPAINT and DrawText, but under seven
> this doesn't work (no text at all is drawn).

Have you tried like in this article :
http://msdn.microsoft.com/en-us/library/bb688195(VS.85).aspx
From: 4N on
Thanks a lot,
looks like what I was looking for.


"nico" <nico(a)nico.com> ha scritto nel messaggio
news:hfjmuv$tr3$1(a)news.albasani.net...
>
> Have you tried like in this article :
> http://msdn.microsoft.com/en-us/library/bb688195(VS.85).aspx