Redrawing window blank

This is a discussion on Redrawing window blank within the Windows Programming forums, part of the Platform Specific Boards category; I am amking a etch -e-sketch program and want to redraw the window blank when WM_MOVE is called. I read ...

  1. #1
    Perverted unanimous's Avatar
    Join Date
    Oct 2001
    Posts
    336

    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?
    Give me a bad reputation!!!

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

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