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

C / C++ / MFC

 
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 
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 
Seems to me that WM_ERASEBKGND is some kind of legacy message that has been maintained for compatibility reasons, but that lacks any real usefulness. The standard sequece of calls and messages is this:
  1. When the window needs to be repainted, WM_PAINT is sent.
  2. OnPaint typically calls BeginPaint, which prepares the window DC, sends WM_ERASEBKGND and returns the DC ready for painting. So, by the time BeginPaint returns, WM_ERASEBKGND has been already processed.
  3. All drawing stuff takes place with the DC returned by BeginPaint.
  4. Once the drawing is finished, EndPaint releases the DC and the handler for OnPaint exits.
I've got two questions regarding this issue that surely Christian Grauss will be able to anwser (are you reading this, Chris ? Smile | :) ):
  1. What are the origins and purpose of the WM_ERASEBKGND? Is there more to this message than I said above?
  2. What is the difference between returning TRUE or FALSE in OnEraseBkGnd?


Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
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 
GeneralSick and tired of VC++ IDE's $#!T Pin
Jason Hooper28-Feb-02 8:59
Jason Hooper28-Feb-02 8:59 

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.