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

C / C++ / MFC

 
RantRe: urgent help Pin
Michael Schubert29-May-09 12:43
Michael Schubert29-May-09 12:43 
GeneralRe: urgent help Pin
Jim Crafton29-May-09 8:38
Jim Crafton29-May-09 8:38 
AnswerRe: urgent help Pin
Wes Aday29-May-09 9:22
professionalWes Aday29-May-09 9:22 
QuestionWriting a Smart OnPaint Routine Pin
BobInNJ29-May-09 7:15
BobInNJ29-May-09 7:15 
AnswerRe: Writing a Smart OnPaint Routine Pin
CPallini29-May-09 7:39
mveCPallini29-May-09 7:39 
GeneralRe: Writing a Smart OnPaint Routine Pin
BobInNJ29-May-09 9:30
BobInNJ29-May-09 9:30 
QuestionRe: Writing a Smart OnPaint Routine Pin
David Crow6-Nov-09 17:23
David Crow6-Nov-09 17:23 
AnswerRe: Writing a Smart OnPaint Routine Pin
CPallini7-Nov-09 11:23
mveCPallini7-Nov-09 11:23 
Since the CPaintDC is created in the view OnPaint method (that in turn calls OnDraw), I think you've to override OnPaint, for instance:
void MyView::OnPaint()
{
   GetUpdateRect(&m_rc);
   CPaintDC dc(this); // device context for painting
   OnPrepareDC(&dc);
   OnDraw(&dc);
}


Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke

[My articles]

GeneralRe: Writing a Smart OnPaint Routine Pin
Michael Dunn30-May-09 18:44
sitebuilderMichael Dunn30-May-09 18:44 
GeneralRe: Writing a Smart OnPaint Routine Pin
BobInNJ31-May-09 4:13
BobInNJ31-May-09 4:13 
QuestionSetwindowPos problem Pin
extreme00129-May-09 6:09
extreme00129-May-09 6:09 
QuestionVisual C++ 6.0 - can't "File Open" after IE 8 and Vista SP2 Pin
Mark C. Malburg29-May-09 5:19
Mark C. Malburg29-May-09 5:19 
AnswerRe: Visual C++ 6.0 - can't "File Open" after IE 8 and Vista SP2 Pin
BobInNJ29-May-09 6:56
BobInNJ29-May-09 6:56 
Answer[OT] Re: Visual C++ 6.0 - can't "File Open" after IE 8 and Vista SP2 Pin
David Crow29-May-09 7:36
David Crow29-May-09 7:36 
GeneralRe: [OT] Re: Visual C++ 6.0 - can't "File Open" after IE 8 and Vista SP2 Pin
Mark C. Malburg29-May-09 8:13
Mark C. Malburg29-May-09 8:13 
AnswerRe: Visual C++ 6.0 - can't "File Open" after IE 8 and Vista SP2 Pin
Joe Woodbury29-May-09 13:30
professionalJoe Woodbury29-May-09 13:30 
AnswerRe: Visual C++ 6.0 - can't "File Open" after IE 8 and Vista SP2 Pin
bodhi rayo11-Oct-10 7:24
bodhi rayo11-Oct-10 7:24 
GeneralRe: Visual C++ 6.0 - can't "File Open" after IE 8 and Vista SP2 Pin
Mark C. Malburg11-Oct-10 8:09
Mark C. Malburg11-Oct-10 8:09 
QuestionCRichtEditView Vertical Auto Scrolling Pin
susanne129-May-09 4:50
susanne129-May-09 4:50 
QuestionWhy the caret of edit control disappeared when it was associated the class encapsulated with my own dll built with CEdit? Pin
bdwzz29-May-09 4:05
bdwzz29-May-09 4:05 
QuestionC + + by diary Pin
anassamar29-May-09 3:12
anassamar29-May-09 3:12 
QuestionRe: C + + by diary Pin
Michael Schubert29-May-09 3:21
Michael Schubert29-May-09 3:21 
AnswerRe: C + + by diary Pin
anassamar1-Jun-09 10:57
anassamar1-Jun-09 10:57 
GeneralRe: C + + by diary Pin
Michael Schubert1-Jun-09 13:02
Michael Schubert1-Jun-09 13:02 
JokeRe: C + + by diary Pin
_AnsHUMAN_ 29-May-09 3:47
_AnsHUMAN_ 29-May-09 3:47 

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.