Click here to Skip to main content
15,918,516 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Why don't run the same programe code on vc++ compiler Pin
Christian Graus3-Jun-03 19:37
protectorChristian Graus3-Jun-03 19:37 
GeneralRe: Why don't run the same programe code on vc++ compiler Pin
sunjohn3-Jun-03 19:47
sunjohn3-Jun-03 19:47 
GeneralRe: Why don't run the same programe code on vc++ compiler Pin
Christian Graus3-Jun-03 19:53
protectorChristian Graus3-Jun-03 19:53 
GeneralRe: Why don't run the same programe code on vc++ compiler Pin
Toni783-Jun-03 19:51
Toni783-Jun-03 19:51 
GeneralRe: Why don't run the same programe code on vc++ compiler Pin
Christian Graus3-Jun-03 19:54
protectorChristian Graus3-Jun-03 19:54 
GeneralRe: Why don't run the same programe code on vc++ compiler Pin
Toni783-Jun-03 20:03
Toni783-Jun-03 20:03 
GeneralRe: Why don't run the same programe code on vc++ compiler Pin
sunjohn3-Jun-03 20:23
sunjohn3-Jun-03 20:23 
GeneralRe: Why don't run the same programe code on vc++ compiler Pin
Christian Graus3-Jun-03 20:25
protectorChristian Graus3-Jun-03 20:25 
GeneralRe: Why don't run the same programe code on vc++ compiler Pin
sunjohn3-Jun-03 20:51
sunjohn3-Jun-03 20:51 
GeneralA question about GDI+ Pin
Anonymous3-Jun-03 13:53
Anonymous3-Jun-03 13:53 
GeneralRe: A question about GDI+ Pin
ucs3-Jun-03 23:56
ucs3-Jun-03 23:56 
GeneralRe: A question about GDI+ Pin
Anonymous4-Jun-03 4:22
Anonymous4-Jun-03 4:22 
GeneralOne more question Pin
Anonymous4-Jun-03 6:02
Anonymous4-Jun-03 6:02 
GeneralRe: One more question Pin
ucs4-Jun-03 12:46
ucs4-Jun-03 12:46 
GeneralRegistry HELP Pin
yoshi113-Jun-03 13:19
yoshi113-Jun-03 13:19 
GeneralRe: Registry HELP Pin
valikac3-Jun-03 13:27
valikac3-Jun-03 13:27 
GeneralRe: Registry HELP Pin
olinn3-Jun-03 17:14
olinn3-Jun-03 17:14 
GeneralTimer Pin
act_x3-Jun-03 12:35
act_x3-Jun-03 12:35 
GeneralRe: Timer Pin
valikac3-Jun-03 13:29
valikac3-Jun-03 13:29 
GeneralCSocket possible bug on win2k Pin
ucs3-Jun-03 12:32
ucs3-Jun-03 12:32 
GeneralRe: CSocket possible bug on win2k Pin
olinn3-Jun-03 17:30
olinn3-Jun-03 17:30 
GeneralRe: CSocket possible bug on win2k Pin
ucs3-Jun-03 23:57
ucs3-Jun-03 23:57 
GeneralRe: CSocket possible bug on win2k Pin
olinn4-Jun-03 0:59
olinn4-Jun-03 0:59 
GeneralEdit controls and fonts Pin
Steven M Hunt3-Jun-03 11:41
Steven M Hunt3-Jun-03 11:41 
I have tried using the select font dialog box to select a font for an edit control and it doesn't work. The edit control goes into the default font. Here's the code i used:

void CDocBar::InitFontDlg()
{
CFont myfont;
LOGFONT lf;
CFontDialog dlgChooseFont;
COLORREF g_rgbText = RGB(0, 0, 0);
CEdit *editControl;

//GetObject(myfont.Detach(), sizeof(LOGFONT), &lf);

dlgChooseFont.m_cf.lpLogFont = &lf;
dlgChooseFont.m_cf.rgbColors = g_rgbText;


if (dlgChooseFont.DoModal() == IDOK)
{
myfont.CreateFontIndirect(dlgChooseFont.m_cf.lpLogFont);

g_rgbText = dlgChooseFont.m_cf.rgbColors;
editControl = (CEdit *) GetDlgItem(IDD_EDIT1);
editControl->SetFont(&myfont, TRUE);
}
}

What could be wrong? I have little experience with fonts.

-- Steve
GeneralRe: Edit controls and fonts Pin
Michael Pauli3-Jun-03 13:15
Michael Pauli3-Jun-03 13:15 

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.