Click here to Skip to main content
15,895,462 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: forcing repaint after CDC::TextOut function [modified] Pin
Ali Rafiee18-Jul-06 6:55
Ali Rafiee18-Jul-06 6:55 
AnswerRe: forcing repaint after CDC::TextOut function Pin
goodoljosh198018-Jul-06 6:59
goodoljosh198018-Jul-06 6:59 
GeneralRe: forcing repaint after CDC::TextOut function Pin
Steve S18-Jul-06 7:14
Steve S18-Jul-06 7:14 
GeneralRe: forcing repaint after CDC::TextOut function Pin
goodoljosh198018-Jul-06 7:21
goodoljosh198018-Jul-06 7:21 
GeneralRe: forcing repaint after CDC::TextOut function Pin
Ali Rafiee18-Jul-06 7:41
Ali Rafiee18-Jul-06 7:41 
QuestionRe: forcing repaint after CDC::TextOut function Pin
goodoljosh198018-Jul-06 7:24
goodoljosh198018-Jul-06 7:24 
AnswerRe: forcing repaint after CDC::TextOut function Pin
Ali Rafiee18-Jul-06 7:37
Ali Rafiee18-Jul-06 7:37 
GeneralRe: forcing repaint after CDC::TextOut function Pin
David Crow18-Jul-06 7:38
David Crow18-Jul-06 7:38 
goodoljosh1980 wrote:
if(RegKeyAvail){


This check is actually not necessary. Much like the view renders whatever the document has in it, the OnPaint() handler should draw whatever value is in a member variable. If that value starts out as blank, so be it.

void CMartinPhDDlg::OnPaint() 
{
    CPaintDC dc(this); // device context for painting 
    dc.SelectObject(&Welcome_font);
    dc.SetBkMode(TRANSPARENT);
    dc.SetTextColor(COLORREF RGB(255,0,0));
    dc.TextOut(30,30, m_strText); // m_strText is set in various other methods 
    
    // don't call DeleteObject() on a font that is currently selected into a DC 
    Welcome_font.DeleteObject();
}



"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank

"Judge not by the eye but by the heart." - Native American Proverb


QuestionHow to show Full Sceen Image Pin
Max++18-Jul-06 4:11
Max++18-Jul-06 4:11 
AnswerRe: How to show Full Sceen Image Pin
Randor 18-Jul-06 4:26
professional Randor 18-Jul-06 4:26 
AnswerRe: How to show Full Sceen Image Pin
Hamid_RT18-Jul-06 4:38
Hamid_RT18-Jul-06 4:38 
QuestionRe: How to show Full Sceen Image Pin
David Crow18-Jul-06 4:44
David Crow18-Jul-06 4:44 
AnswerRe: How to show Full Sceen Image Pin
Max++18-Jul-06 4:54
Max++18-Jul-06 4:54 
GeneralRe: How to show Full Sceen Image Pin
Ali Rafiee18-Jul-06 5:02
Ali Rafiee18-Jul-06 5:02 
GeneralRe: How to show Full Sceen Image Pin
Hamid_RT18-Jul-06 5:24
Hamid_RT18-Jul-06 5:24 
AnswerRe: How to show Full Sceen Image Pin
Ali Rafiee18-Jul-06 4:52
Ali Rafiee18-Jul-06 4:52 
AnswerRe: How to show Full Sceen Image Pin
ThatsAlok18-Jul-06 21:23
ThatsAlok18-Jul-06 21:23 
Questionmerging two .rc files? [modified] Pin
Kora18-Jul-06 4:09
Kora18-Jul-06 4:09 
AnswerRe: merging two .rc files? Pin
Randor 18-Jul-06 4:40
professional Randor 18-Jul-06 4:40 
AnswerRe: merging two .rc files? Pin
Kora18-Jul-06 6:03
Kora18-Jul-06 6:03 
AnswerRe: merging two .rc files? Pin
toxcct18-Jul-06 6:03
toxcct18-Jul-06 6:03 
GeneralRe: merging two .rc files? [modified] Pin
Kora18-Jul-06 6:42
Kora18-Jul-06 6:42 
Questionhandling the RETURN key Pin
Tara1418-Jul-06 4:08
Tara1418-Jul-06 4:08 
AnswerRe: handling the RETURN key Pin
Randor 18-Jul-06 4:38
professional Randor 18-Jul-06 4:38 
AnswerRe: handling the RETURN key Pin
David Crow18-Jul-06 4:44
David Crow18-Jul-06 4:44 

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.