Click here to Skip to main content
15,914,013 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In the WTL project , I wanna fill the combobox with the font. Then I could choose the font to edit my text , but I do not know how to realize it in the WTL project.
Need some help, THX.
Posted

1 solution

Use the Choose Font common dialog[^]

Don't reinvent the wheel :)
 
Share this answer
 
Comments
Lecter11 26-Jun-12 22:14pm    
Thanks , maybe you misunderstand it ,but I wanna just to ues the font style like Times New Roman , Arial and so on . not the underline or bold , so it is only a font choose combobox .
barneyman 26-Jun-12 22:21pm    
Like this?
Lecter11 26-Jun-12 22:39pm    
Yeah , but I can not compile it on the VS2010 even I has included the WTL header files .
barneyman 26-Jun-12 22:47pm    
yeah - it does look a bit old

You're only really interested in the OnMeasureItem and OnDrawItem messages; just create/subclass a WTL combobox and handle those messages

Google for OWNERDRAW combobox atl to get more specific ideas
Lecter11 26-Jun-12 22:55pm    
Thanks a lot . and now I believe I can finish it with your advice . and when facing the problem I can not solve , I will contact you , with mail?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900