Click here to Skip to main content
15,888,454 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: scanf bug? Pin
Deian14-Jun-06 21:50
Deian14-Jun-06 21:50 
GeneralRe: scanf bug? Pin
Arvind Bharti15-Jun-06 23:27
Arvind Bharti15-Jun-06 23:27 
GeneralRe: scanf bug? Pin
Deian16-Jun-06 4:57
Deian16-Jun-06 4:57 
AnswerRe: scanf bug? Pin
yogendra kaushik15-Jun-06 2:49
yogendra kaushik15-Jun-06 2:49 
QuestionSetFont for CWnd class [modified] Pin
ns14-Jun-06 9:34
ns14-Jun-06 9:34 
AnswerRe: SetFont for CWnd class Pin
David Crow14-Jun-06 9:38
David Crow14-Jun-06 9:38 
AnswerRe: SetFont for CWnd class Pin
see me14-Jun-06 17:44
see me14-Jun-06 17:44 
GeneralRe: SetFont for CWnd class Pin
ns16-Jun-06 5:32
ns16-Jun-06 5:32 
Here is what worked for me:

CClientDC dc(this);
 CFont l_font;
 l_font.CreateFont(14, 0, 0, 0, FW_NORMAL,
 FALSE, FALSE, FALSE, 0, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,   DEFAULT_QUALITY, DEFAULT_PITCH | FF_ROMAN, "Times New Roman");

 CFont* l_old_font = dc.SelectObject(&l_font); dc.TextOut(50, 50, "Hello World");
 dc.SelectObject(l_old_font);
 // Delete the font object.
 l_font.DeleteObject();

except that I got my CDC in the OnraseBackground function of the CStatic class.
Thanks everyone for helping.
sb
AnswerRe: SetFont for CWnd class Pin
Hamid_RT14-Jun-06 19:23
Hamid_RT14-Jun-06 19:23 
QuestionFunction calling standard? Pin
Fame Ketover14-Jun-06 9:22
Fame Ketover14-Jun-06 9:22 
AnswerRe: Function calling standard? Pin
David Crow14-Jun-06 9:32
David Crow14-Jun-06 9:32 
AnswerRe: Function calling standard? Pin
Laxman Auti14-Jun-06 18:30
Laxman Auti14-Jun-06 18:30 
QuestionIStream to FILE* Pin
Fwzklmn14-Jun-06 8:42
Fwzklmn14-Jun-06 8:42 
AnswerRe: IStream to FILE* Pin
Stephen Hewitt14-Jun-06 16:26
Stephen Hewitt14-Jun-06 16:26 
AnswerRe: IStream to FILE* Pin
Hamid_RT14-Jun-06 19:54
Hamid_RT14-Jun-06 19:54 
AnswerRe: Administrative system of parking tower Pin
David Crow14-Jun-06 8:17
David Crow14-Jun-06 8:17 
GeneralRe: Administrative system of parking tower Pin
lulu044115-Jun-06 5:28
lulu044115-Jun-06 5:28 
QuestionRe: Administrative system of parking tower Pin
David Crow15-Jun-06 5:37
David Crow15-Jun-06 5:37 
Question[Message Deleted] Pin
erfi14-Jun-06 7:48
erfi14-Jun-06 7:48 
QuestionRe: data base creating Pin
David Crow14-Jun-06 7:52
David Crow14-Jun-06 7:52 
AnswerRe: data base creating Pin
erfi14-Jun-06 7:59
erfi14-Jun-06 7:59 
GeneralRe: data base creating Pin
David Crow14-Jun-06 8:15
David Crow14-Jun-06 8:15 
AnswerRe: data base creating Pin
Hamid_RT14-Jun-06 19:10
Hamid_RT14-Jun-06 19:10 
QuestionSearch for help about Msn robot! Pin
onlysaint14-Jun-06 7:39
onlysaint14-Jun-06 7:39 
AnswerRe: Search for help about Msn robot! Pin
Blake Miller14-Jun-06 12:15
Blake Miller14-Jun-06 12: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.