Avatar of Rasim
Rasim
 asked on

CMyButton dont't changing font

I derived class CMyButton from CButton and after it button became draw text with system, bold font.
When i am changing current font for button dc(dialog dc) it do nothing.
Only if i am making owner draw button it take affect,but in this case i need to draw entire button.
Did somebody meet this situation?
I will be thanking for answers.
Fonts TypographySystem Programming

Avatar of undefined
Last Comment
Zoppo

8/22/2022 - Mon
Roshan Davis

In your CMyButton's OnPaint function use

CFont* pFont = GetParent()->GetFont();
select this font to paint dc

and use draw text.

Good Luck
ASKER CERTIFIED SOLUTION
Zoppo

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Your help has saved me hundreds of hours of internet surfing.
fblack61