Click here to Skip to main content
15,896,207 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionis this possible? Pin
jafrazee28-Feb-02 9:44
jafrazee28-Feb-02 9:44 
AnswerRe: is this possible? Pin
alex.barylski28-Feb-02 9:52
alex.barylski28-Feb-02 9:52 
AnswerRe: is this possible? Pin
Tim Deveaux28-Feb-02 9:55
Tim Deveaux28-Feb-02 9:55 
GeneralRe: is this possible? Pin
alex.barylski28-Feb-02 10:00
alex.barylski28-Feb-02 10:00 
GeneralRe: is this possible? Pin
Tim Deveaux28-Feb-02 10:17
Tim Deveaux28-Feb-02 10:17 
GeneralRe: is this possible? Pin
Todd.Harvey1-Mar-02 3:40
Todd.Harvey1-Mar-02 3:40 
AnswerRe: is this possible? Pin
Shog928-Feb-02 9:58
sitebuilderShog928-Feb-02 9:58 
GeneralOnEraseBkgnd VS OnPaint Pin
alex.barylski28-Feb-02 9:33
alex.barylski28-Feb-02 9:33 
What are the differences between OnErase and OnPaint.

Although I haven't actually tested or noticed, I assume OnPaint is called after. OnErase would be used for...drawing the background and OnPaint would be used for...drawing the forground, this is why i assume OnPaint is called second. Are there any other deifferences between them that i'm missing here...?

Also...double buffering doesn't seem to work in OnErase so I always get flicker.

CMemDC class works AWESOME!!! Kudos to the author, small simple...i one include file...I Like it!

However this class requires you to override onErase and return FALSE..?(i think) I guess this means all drawing should be done in OnPaint...???

I'm curious to know the purpose of OnErase...???

The reason I ask is i'm creating a control from scratch (CWnd) and do all the drawing etc...OnErase causes flicker and OnPaint don't...whats the deal...?

Cheers! Smile | :)

"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
GeneralRe: OnEraseBkgnd VS OnPaint Pin
Joaquín M López Muñoz28-Feb-02 10:41
Joaquín M López Muñoz28-Feb-02 10:41 
GeneralRe: OnEraseBkgnd VS OnPaint Pin
Christian Graus28-Feb-02 10:52
protectorChristian Graus28-Feb-02 10:52 
GeneralRe: OnEraseBkgnd VS OnPaint Pin
Tim Smith28-Feb-02 11:10
Tim Smith28-Feb-02 11:10 
GeneralRe: OnEraseBkgnd VS OnPaint Pin
alex.barylski28-Feb-02 12:22
alex.barylski28-Feb-02 12:22 
GeneralRe: OnEraseBkgnd VS OnPaint Pin
Christian Graus28-Feb-02 12:24
protectorChristian Graus28-Feb-02 12:24 
GeneralRe: OnEraseBkgnd VS OnPaint Pin
Jon Hulatt28-Feb-02 23:23
Jon Hulatt28-Feb-02 23:23 
GeneralRe: OnEraseBkgnd VS OnPaint Pin
Paul M Watt28-Feb-02 10:59
mentorPaul M Watt28-Feb-02 10:59 
GeneralRe: OnEraseBkgnd VS OnPaint Pin
alex.barylski28-Feb-02 12:15
alex.barylski28-Feb-02 12:15 
GeneralRe: OnEraseBkgnd VS OnPaint Pin
Paul M Watt28-Feb-02 14:23
mentorPaul M Watt28-Feb-02 14:23 
GeneralRe: OnEraseBkgnd VS OnPaint Pin
alex.barylski28-Feb-02 16:26
alex.barylski28-Feb-02 16:26 
GeneralRe: OnEraseBkgnd VS OnPaint Pin
Paul M Watt28-Feb-02 19:52
mentorPaul M Watt28-Feb-02 19:52 
GeneralRe: OnEraseBkgnd VS OnPaint Pin
Paul M Watt28-Feb-02 10:53
mentorPaul M Watt28-Feb-02 10:53 
GeneralRe: OnEraseBkgnd VS OnPaint Pin
alex.barylski28-Feb-02 12:29
alex.barylski28-Feb-02 12:29 
GeneralRe: OnEraseBkgnd VS OnPaint Pin
Paul M Watt28-Feb-02 14:26
mentorPaul M Watt28-Feb-02 14:26 
GeneralRe: OnEraseBkgnd VS OnPaint Pin
alex.barylski28-Feb-02 16:35
alex.barylski28-Feb-02 16:35 
GeneralRe: OnEraseBkgnd VS OnPaint Pin
alex.barylski28-Feb-02 17:17
alex.barylski28-Feb-02 17:17 
GeneralRe: OnEraseBkgnd VS OnPaint Pin
Paul M Watt28-Feb-02 19:46
mentorPaul M Watt28-Feb-02 19:46 

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.