title: FillRect won't draw anything
body: <p>I'm trying to create a simple window in Win32 and draw a rectangle in it, but for some reason FillRect isn't working for me. Here's my source:</p>
  
  <pre><code>#include &lt;windows.h&gt;
  #include "resource.h"
  
  RECT rect;
  
  LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
  {
      static PAINTSTRUCT ps;
      static HDC hDC;
  
      switch(msg)
      {
          case WM_PAINT:
              hDC = BeginPaint(hWnd, &amp;ps);
  
              FillRect(hDC, &amp;rect, (HBRUSH)(COLOR_WINDOW+1));
  
              EndPaint(hWnd, &amp;ps);
          break;
  
          case WM_CLOSE:
              DestroyWindow(hWnd);
          break;
  
          case WM_DESTROY:
              PostQuitMessage(0);
          break;
  
          default:
              return DefWindowProc(hWnd, msg, wParam, lParam);
      }
      return 0;
  }
  
  
  int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
  {
      WNDCLASSEX wc;
      HWND hWnd;
      MSG msg;
      rect.left = 0;
      rect.right = 0;
      rect.top = 100;
      rect.bottom = 100;
  
      wc.cbSize        = sizeof(WNDCLASSEX);
      wc.style         = 0;
      wc.lpfnWndProc   = WndProc;
      wc.cbClsExtra    = 0;
      wc.cbWndExtra    = 0;
      wc.hInstance     = hInstance;
      wc.hIcon         = LoadIcon(NULL, IDI_APPLICATION);
      wc.hCursor       = LoadCursor(NULL, IDC_ARROW);
      wc.hbrBackground = (HBRUSH)(COLOR_ACTIVEBORDER+1);
      wc.lpszMenuName  = MAKEINTRESOURCE(IDR_MAIN_MENU);
      wc.lpszClassName = "Main";
      wc.hIconSm       = LoadIcon(NULL, IDI_APPLICATION);
  
      RegisterClassEx(&amp;wc);
  
      hWnd = CreateWindowEx(NULL, "Main", "Main", WS_SYSMENU | WS_MINIMIZEBOX, CW_USEDEFAULT, CW_USEDEFAULT, 240, 360, NULL, NULL, hInstance, NULL);
  
      ShowWindow(hWnd, nCmdShow);
      UpdateWindow(hWnd);
  
      while(GetMessage(&amp;msg, NULL, 0, 0) &gt; 0)
      {
          TranslateMessage(&amp;msg);
          DispatchMessage(&amp;msg);
      }
  
      return msg.wParam;
  }
  </code></pre>
  
  <p>Is there something I'm missing or doing wrong in my code? Thanks in advance</p>