Thread: BeginPaint()

  1. #1
    samurai warrior nextus's Avatar
    Join Date
    Nov 2001
    Posts
    196

    BeginPaint()

    does BeginPaint erase the whole client area..or just the invalid region?

    Petzold said "During the BeginPaint call, Windows erase the background fo the client area" in Chapter 3

    In Chapter 4 Petzold says "The BeginPaint function generally causes the background of the invalid region to be erased."

    please help

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    Its always good to see what Microsoft says....looks like it depends.
    If the update region is marked for erasing, BeginPaint sends a WM_ERASEBKGND message to the window.
    We need more expertise I guess...

    gg
    Last edited by Codeplug; 03-08-2003 at 11:59 PM.

  3. #3
    samurai warrior nextus's Avatar
    Join Date
    Nov 2001
    Posts
    196
    meaning erases the whole background with the brush specified in the window class?
    nextus, the samurai warrior

  4. #4
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    WM_ERASEBKGND

    "Teach a man to fish...blah blah blah"

    gg

  5. #5
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    ...so you could handle the message yourself, or specify a brush in hbrBackground.

    gg

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. My pong game stops painting
    By SniperSAS in forum Game Programming
    Replies: 15
    Last Post: 11-25-2005, 03:42 PM
  2. Need some more assistance
    By Thantos in forum Windows Programming
    Replies: 6
    Last Post: 08-14-2003, 12:13 PM
  3. BeginPaint and GetDC called in succession
    By JasonD in forum Windows Programming
    Replies: 2
    Last Post: 05-23-2003, 12:06 PM
  4. another question on BeginPaint()
    By nextus in forum Windows Programming
    Replies: 2
    Last Post: 03-09-2003, 01:43 PM
  5. BeginPaint() & EndPaint();
    By tegwin in forum Windows Programming
    Replies: 4
    Last Post: 06-10-2002, 10:09 AM