Thread: refreshing the background

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    106

    refreshing the background

    decided to pick up win32 again, and am working on a little program using the GDI. was wondering,how do i clear the window, say if the player wins the game, and wants to start a new one?
    any help would be greatly appreciated.
    thanks a lot.

  2. #2
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    The idea is to use InvalidateRect() or InvalidateRegion() to force a repaint with the background erased then paint on your clean screen the message you want using TextOut() or DrawText() etc.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  3. #3
    Registered User
    Join Date
    Aug 2001
    Posts
    106
    thanks a lot, got what i needed.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Windows background color
    By Exile in forum Windows Programming
    Replies: 2
    Last Post: 01-23-2005, 07:55 AM
  2. Detect Close of a background process
    By Schwarzhelm in forum C Programming
    Replies: 1
    Last Post: 11-05-2003, 01:46 AM
  3. Background Colour in Windows API
    By Vicked in forum Windows Programming
    Replies: 2
    Last Post: 04-14-2003, 03:49 AM
  4. background process switches to stopped
    By bonkey in forum Linux Programming
    Replies: 3
    Last Post: 11-20-2002, 08:27 AM
  5. how to set the background colour of a static box?
    By Cobras2 in forum Windows Programming
    Replies: 2
    Last Post: 08-01-2002, 04:57 PM