Click here to Skip to main content
15,912,897 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCould really use some suggestions Pin
Tom Wright15-Sep-04 11:49
Tom Wright15-Sep-04 11:49 
GeneralRe: Could really use some suggestions Pin
Christian Graus15-Sep-04 11:59
protectorChristian Graus15-Sep-04 11:59 
GeneralRe: Could really use some suggestions Pin
Tom Wright15-Sep-04 12:20
Tom Wright15-Sep-04 12:20 
GeneralRe: Could really use some suggestions Pin
Christian Graus15-Sep-04 12:50
protectorChristian Graus15-Sep-04 12:50 
GeneralRe: Could really use some suggestions Pin
Henry miller16-Sep-04 3:34
Henry miller16-Sep-04 3:34 
Generalchange a dialog's font at runtime Pin
BlackDice15-Sep-04 11:47
BlackDice15-Sep-04 11:47 
GeneralRe: change a dialog's font at runtime Pin
Ryan Binns15-Sep-04 18:27
Ryan Binns15-Sep-04 18:27 
GeneralRe: change a dialog's font at runtime Pin
BlackDice16-Sep-04 4:20
BlackDice16-Sep-04 4:20 
I didn't get my e-mail notification from this thread so I thought nobody had answered it. I've gotten the font to change for the edit control, but now all the other controls on my dialog also change their fonts. Not to the font I selected, but to some ugly bold default system font. It's as if I have no font selected. Instead of initializing the CFontDialog with my control's current font, I used the dialog's just to see what it was. The first time, the right font is selected when I open the dialog. (10pt Tahoma) after I set the controls font once and open it again with the dialog's current font, nothing is selected as if my dialog has no font. this is what I have now:

ZeroMemory(&m_Font,sizeof(LOGFONT));
  	CFont* pFont = m_LockEdit.GetFont();
	pFont->GetLogFont(&m_Font);
	CFontDialog dlg(&m_Font);
	dlg.m_cf.Flags |= CF_TTONLY;	//so user can only choose Truetype or OEM fonts
	
	if(dlg.DoModal() == IDOK)
	{
		LOGFONT lgfnt;
		dlg.GetCurrentFont(&lgfnt);
		m_cFont.DeleteObject();
		m_cFont.CreateFontIndirect( &lgfnt );
		m_LockEdit.SetFont( &m_cFont, TRUE );
		pFont->DeleteObject();
		
	}


[insert witty comment here]

bdiamond Sleepy | :zzz:
GeneralRe: change a dialog's font at runtime Pin
Ryan Binns16-Sep-04 13:59
Ryan Binns16-Sep-04 13:59 
Generaladd help (?) button to title bar of child MDI window Pin
elephantstar15-Sep-04 11:28
elephantstar15-Sep-04 11:28 
GeneralTemplate issue Pin
Bob Stanneveld15-Sep-04 10:32
Bob Stanneveld15-Sep-04 10:32 
GeneralRe: Template issue Pin
Michael Dunn15-Sep-04 10:48
sitebuilderMichael Dunn15-Sep-04 10:48 
GeneralRe: Template issue Pin
Bob Stanneveld15-Sep-04 11:10
Bob Stanneveld15-Sep-04 11:10 
GeneralProtect application from hooking Pin
Fabio Panzavolta15-Sep-04 10:01
Fabio Panzavolta15-Sep-04 10:01 
GeneralRe: Protect application from hooking Pin
User 58385215-Sep-04 15:55
User 58385215-Sep-04 15:55 
GeneralRe: Protect application from hooking Pin
Fabio Panzavolta15-Sep-04 22:47
Fabio Panzavolta15-Sep-04 22:47 
GeneralCost of type Casting Pin
Nacho Chip15-Sep-04 9:59
Nacho Chip15-Sep-04 9:59 
GeneralRe: Cost of type Casting Pin
Andrew Walker15-Sep-04 13:02
Andrew Walker15-Sep-04 13:02 
GeneralSearching Image inside the Bitmap Pin
Azghar Hussain15-Sep-04 9:17
professionalAzghar Hussain15-Sep-04 9:17 
GeneralRe: Searching Image inside the Bitmap Pin
David Crow15-Sep-04 9:35
David Crow15-Sep-04 9:35 
GeneralRe: Searching Image inside the Bitmap Pin
Alexander M.,16-Sep-04 9:56
Alexander M.,16-Sep-04 9:56 
GeneralExtract an ISO File To the Local disk Pin
ntuyen0115-Sep-04 9:16
ntuyen0115-Sep-04 9:16 
GeneralRe: Extract an ISO File To the Local disk Pin
David Crow15-Sep-04 9:33
David Crow15-Sep-04 9:33 
GeneralRe: Extract an ISO File To the Local disk Pin
ntuyen0115-Sep-04 10:02
ntuyen0115-Sep-04 10:02 
GeneralRe: Extract an ISO File To the Local disk Pin
David Crow15-Sep-04 10:08
David Crow15-Sep-04 10:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.