Link to home
Start Free TrialLog in
Avatar of jstolan
jstolan

asked on

Setting the font for a windows title bar

Is there an easy way to set the font used in a window's title bar.  I do not want to change the overall system properties, just the font in certain windows.  I would prefer to avoid using non-client draw messages.

Any suggestions?
Avatar of Belgarat
Belgarat

Sorry, it seems that there is not a message/system call that would change font in window's caption. Try sending WM_SETFONT, but I suppose that only standard window classes (controls & dialog boxes) will accept it.
The only way I think about is to handle WM_NCPAINT in your program.
I can send you the code, but it's in Visual Basic 5, but it uses API -- so you will easily convert it to C
OK?
Avatar of jstolan

ASKER

To topol

If I can adapt it, I will gladly give you the points.  My E-mail is

jstolan@ossconsulting.com

PS to Belgarat WM_SETFONT doesn't work
topol: can you send me your code too ? e-mail is svatopluk.dedic@st.mff.cuni.cz.
Thanks in advance :-)
topol: can you send me your code too ? e-mail is shaig@inter.net.il
Thanks in advance :-)
ASKER CERTIFIED SOLUTION
Avatar of piano_boxer
piano_boxer

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jstolan

ASKER

Thanks piano_boxer, that's just what I was looking for.  I must admit it was a little more complicated than I thought.  I was able to simplify your sample quite a bit, as all I really needed was to change the font so Kanji characters would be guaranteed to be displayed.

Topol, I got your E-mail.  But in fairness, piano-boxer's example was more appropriate since it was in MFC.  If you would like some points, leave a message here and I will put up a special question for you.