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

C / C++ / MFC

 
JokeRe: write a complete program for this one in Visual C++ Pin
Jagdish V. Bhimbha10-Jun-08 5:20
Jagdish V. Bhimbha10-Jun-08 5:20 
QuestionProblems with screen redrawing [modified] Pin
kildareflare10-Jun-08 0:17
kildareflare10-Jun-08 0:17 
AnswerRe: Problems with screen redrawing Pin
Rage10-Jun-08 0:52
professionalRage10-Jun-08 0:52 
GeneralRe: Problems with screen redrawing Pin
kildareflare10-Jun-08 1:47
kildareflare10-Jun-08 1:47 
AnswerRe: Problems with screen redrawing Pin
Cedric Moonen10-Jun-08 0:58
Cedric Moonen10-Jun-08 0:58 
GeneralRe: Problems with screen redrawing Pin
kildareflare10-Jun-08 1:57
kildareflare10-Jun-08 1:57 
AnswerRe: Problems with screen redrawing Pin
Jagdish V. Bhimbha10-Jun-08 5:16
Jagdish V. Bhimbha10-Jun-08 5:16 
AnswerRe: Problems with screen redrawing Pin
Mark Salsbery10-Jun-08 6:14
Mark Salsbery10-Jun-08 6:14 
kildareflare wrote:
I have solved problem (1) by overriding the base class (CFormView) OnDraw method and calling UpdateWindow as shown below:


This shouldn't fix anything. OnDraw() is called for every WM_PAINT message
so calling UpdateWindow() to force a WM_PAINT message from the WM_PAINT
message handler is just wrong.

If you are using both WM_PAINT handlers and OnDraw() in your CView-derived classes,
then make sure you're not doing recursive stuff like this.

It's much simpler to use just the OnDraw() method for your painting.
If you must use your own WM_PAINT handler, then you can eliminate the OnDraw()
virtual call if you need to.

See the source code for CView::OnPaint() for details.

Mark

Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralPROBLEM FIXED [modified] Pin
kildareflare11-Jun-08 1:09
kildareflare11-Jun-08 1:09 
QuestionCustom Control vs. Owner Draw Control? Pin
sawerr9-Jun-08 23:56
sawerr9-Jun-08 23:56 
AnswerRe: Custom Control vs. Owner Draw Control? Pin
Rage10-Jun-08 0:50
professionalRage10-Jun-08 0:50 
AnswerRe: Custom Control vs. Owner Draw Control? Pin
Joe Woodbury10-Jun-08 6:17
professionalJoe Woodbury10-Jun-08 6:17 
GeneralRe: Custom Control vs. Owner Draw Control? Pin
sawerr10-Jun-08 7:13
sawerr10-Jun-08 7:13 
GeneralRe: Custom Control vs. Owner Draw Control? Pin
Joe Woodbury10-Jun-08 7:58
professionalJoe Woodbury10-Jun-08 7:58 
QuestionVC++ Toolkit 2003 warning message Pin
rp_suman9-Jun-08 22:45
rp_suman9-Jun-08 22:45 
AnswerRe: VC++ Toolkit 2003 warning message Pin
Alan Balkany10-Jun-08 4:23
Alan Balkany10-Jun-08 4:23 
GeneralRe: VC++ Toolkit 2003 warning message Pin
rp_suman10-Jun-08 14:03
rp_suman10-Jun-08 14:03 
QuestionHelp with navigate2 error Pin
limesp9-Jun-08 22:44
limesp9-Jun-08 22:44 
AnswerRe: Help with navigate2 error Pin
CPallini9-Jun-08 23:07
mveCPallini9-Jun-08 23:07 
QuestionConvert CComPtr<istream> into ostream</istream> Pin
CodingLover9-Jun-08 22:27
CodingLover9-Jun-08 22:27 
Answeristream to ostream? Pin
CPallini9-Jun-08 22:46
mveCPallini9-Jun-08 22:46 
QuestionRe: istream to ostream? Pin
CodingLover9-Jun-08 22:49
CodingLover9-Jun-08 22:49 
QuestionLength of IStream Pin
CodingLover10-Jun-08 0:18
CodingLover10-Jun-08 0:18 
QuestionCreateThread parameter Pin
rp_suman9-Jun-08 22:23
rp_suman9-Jun-08 22:23 
AnswerRe: CreateThread parameter Pin
Cedric Moonen9-Jun-08 22:26
Cedric Moonen9-Jun-08 22:26 

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.