Thread: Redrawing window blank

  1. #1

    Question Redrawing window blank

    I am amking a etch -e-sketch program and want to redraw the window blank when WM_MOVE is called. I read of a function in the windows GDI called RedrawWindow(), would that do it?

  2. #2
    Used Registerer jdinger's Avatar
    Join Date
    Feb 2002
    Posts
    1,065
    Why not use FillRect?

    Code:
    RECT rcClient;
    GetClientRect(hwnd,&rcClient);
    HDC hdc=GetDC(hwnd);
    FillRect(hdc,&rcClient,(HBRUSH)GetStockObject(BLACK_BRUSH));
    ReleaseDC(hwnd,hdc);
    Of course if you don't want to fill the entire client area just define the size/location of your custom RECT yourself instead of using GetClientRect.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. WM_CAPTION causing CreateWindowEx() to fail.
    By Necrofear in forum Windows Programming
    Replies: 8
    Last Post: 04-06-2007, 08:23 AM
  2. 6 measly errors
    By beene in forum Game Programming
    Replies: 11
    Last Post: 11-14-2006, 11:06 AM
  3. Linking OpenGL in Dev-C++
    By linkofazeroth in forum Game Programming
    Replies: 4
    Last Post: 09-13-2005, 10:17 AM
  4. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 12:34 PM
  5. problem with open gl engine.
    By gell10 in forum Game Programming
    Replies: 1
    Last Post: 08-21-2003, 04:10 AM