Click here to Skip to main content
15,921,646 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Create Font to match Dialogue Box Pin
Owner drawn11-Jan-06 21:51
Owner drawn11-Jan-06 21:51 
GeneralRe: Create Font to match Dialogue Box Pin
LittleYellowBird12-Jan-06 4:32
LittleYellowBird12-Jan-06 4:32 
QuestionFunction as argument Pin
kk.tvm11-Jan-06 20:35
kk.tvm11-Jan-06 20:35 
AnswerRe: Function as argument Pin
Owner drawn11-Jan-06 20:44
Owner drawn11-Jan-06 20:44 
AnswerRe: Function as argument Pin
Zdeslav Vojkovic11-Jan-06 20:47
Zdeslav Vojkovic11-Jan-06 20:47 
AnswerRe: Function as argument Pin
Cedric Moonen11-Jan-06 20:48
Cedric Moonen11-Jan-06 20:48 
GeneralRe: Function as argument Pin
Zdeslav Vojkovic11-Jan-06 21:06
Zdeslav Vojkovic11-Jan-06 21:06 
GeneralRe: Function as argument Pin
Cedric Moonen11-Jan-06 21:13
Cedric Moonen11-Jan-06 21:13 
GeneralRe: Function as argument Pin
kk.tvm11-Jan-06 20:56
kk.tvm11-Jan-06 20:56 
QuestionSticky Windows? Pin
S Douglas11-Jan-06 20:25
professionalS Douglas11-Jan-06 20:25 
AnswerRe: Sticky Windows? Pin
Rage11-Jan-06 22:34
professionalRage11-Jan-06 22:34 
GeneralRe: Sticky Windows? Pin
S Douglas11-Jan-06 22:43
professionalS Douglas11-Jan-06 22:43 
QuestionDBF file usage Pin
<color>Aljechin 11-Jan-06 19:55
<color>Aljechin 11-Jan-06 19:55 
AnswerNo Pin
__yb13-Jan-06 12:15
__yb13-Jan-06 12:15 
QuestionCan a BHO do this? Pin
Chintoo72311-Jan-06 19:18
Chintoo72311-Jan-06 19:18 
AnswerRe: Can a BHO do this? Pin
__yb13-Jan-06 12:18
__yb13-Jan-06 12:18 
Questiontry/catch - getting line number Pin
Chintoo72311-Jan-06 19:09
Chintoo72311-Jan-06 19:09 
AnswerRe: try/catch - getting line number Pin
__yb13-Jan-06 12:22
__yb13-Jan-06 12:22 
AnswerRe: try/catch - getting line number Pin
Shraddhan25-Jan-06 13:09
Shraddhan25-Jan-06 13:09 
GeneralRe: try/catch - getting line number Pin
Chintoo72325-Jan-06 15:18
Chintoo72325-Jan-06 15:18 
GeneralRe: try/catch - getting line number Pin
Shraddhan25-Jan-06 15:38
Shraddhan25-Jan-06 15:38 
QuestionVisual C++ Shortcut Keys Pin
romuzu11-Jan-06 18:59
romuzu11-Jan-06 18:59 
AnswerRe: Visual C++ Shortcut Keys Pin
Owner drawn11-Jan-06 19:08
Owner drawn11-Jan-06 19:08 
Questionhow to capture the DocumentBeforePrint Event in my ActiveX of Word written in VC? Pin
sharkmouse11-Jan-06 18:43
sharkmouse11-Jan-06 18:43 
QuestionTrouble in MFC CFont Pin
LaHaHa11-Jan-06 18:32
LaHaHa11-Jan-06 18:32 
My dialog program will start another dialog by pressing a button
Cxx dlg
dlg.DoModal();

In the Cxx dialog, I will create font by doing this
//Cxx.h
CFont m_font1;

//Cxx.cpp
//BOOL Cxx::OnInitDialog()

LOGFONT lf;
memset(&lf, 0, sizeof(LOGFONT)); // Clear out structure.

lf.lfHeight = 25; // Request a 25-pixel-high font
lf.lfWeight = 700;
strcpy(lf.lfFaceName, "Arial"); // with face name "Arial".
m_font1.CreateFontIndirect(&lf); // Create the font.

The problem is that when I try to start the Cxx dialog second time.
The program will get error in creating the m_font1 again.
Please help!


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.