Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to set the font of an edit using just the Window handle?

Status
Not open for further replies.

richardchaven

Programmer
Jan 13, 2003
161
US
I am messing with a TTreeView (yes, I know, but I'm not going to use an alternative). I want to have the .Font apply to the embedded edit control.

I can "override" the WndProc and do the painting myself, but the text caret does not align to the correct character and the control itself is too narrow when the I choose to paint a node's text in bold, italic, etc.

I finally found WM_SETFONT, but it does not seem to work when I Post it to the edit control's handle in response to the TVN_BEGINLABELEDIT message.

Any ideas?

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top