BeginPaint()

This is a discussion on BeginPaint() within the Windows Programming forums, part of the Platform Specific Boards category; does BeginPaint erase the whole client area..or just the invalid region? Petzold said "During the BeginPaint call, Windows erase the ...

  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,659
    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 10: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,659
    WM_ERASEBKGND

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

    gg

  5. #5
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,659
    ...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, 02: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, 12:43 PM
  5. BeginPaint() & EndPaint();
    By tegwin in forum Windows Programming
    Replies: 4
    Last Post: 06-10-2002, 10:09 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21