-
January 15th, 2014, 12:14 PM
#1
[RESOLVED] How to increase font size in buttons
How to increase font size for a specific button?
I tried to change the nHeight but it doesn't seems to change the font size. Any idea why?
Code:
CFont font;
font.CreateFont(
12, // nHeight
0, // nWidth
0, // nEscapement
0, // nOrientation
FW_REGULAR, // nWeight
FALSE, // bItalic
FALSE, // bUnderline
0, // cStrikeOut
ANSI_CHARSET, // nCharSet
OUT_DEFAULT_PRECIS, // nOutPrecision
CLIP_DEFAULT_PRECIS, // nClipPrecision
DEFAULT_QUALITY, // nQuality
DEFAULT_PITCH | FF_SWISS, // nPitchAndFamily
"Arial");
GetDlgItem( IDC_BUTTON3 )->SetFont(&font);
-
January 15th, 2014, 12:37 PM
#2
Re: How to increase font size in buttons
Probably because your CFont object is local to the function that sets the font.
-
January 16th, 2014, 02:26 AM
#3
Re: How to increase font size in buttons
Thank you sir .. I also tried the prog.
I just shifted CFont font to dialog.h file . That solved the problem.
-
January 16th, 2014, 02:42 PM
#4
Re: How to increase font size in buttons
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|