title: C++ Win32 Window unresponsive
body: <p>I have a console application from which I create a window. </p>
  
  <p>I can render stuff in the window just fine. But the window is unresponsive/uncontrollable by the user. </p>
  
  <p>As soon as you mouse over the window you get the hourglass cursor and cannot move the window.</p>
  
  <p>What might be causing this?</p>
  
  <p>EDIT:</p>
  
  <pre><code>    WNDCLASSEX wndClass;         // Window class
      ZeroMemory(&amp;wndClass, sizeof(wndClass)); // Clear the window class structure
      wndClass.cbSize = sizeof(WNDCLASSEX); 
      wndClass.style          = CS_HREDRAW | CS_VREDRAW | CS_CLASSDC;
      wndClass.lpfnWndProc    = DefWindowProc;
      wndClass.cbClsExtra     = 0;
      wndClass.cbWndExtra     = 0;
      wndClass.hInstance      = nullptr;
      wndClass.hCursor        = LoadCursor(NULL, IDC_ARROW);
      wndClass.hbrBackground  = (HBRUSH)(COLOR_WINDOW+1);
      wndClass.lpszMenuName   = NULL;//MAKEINTRESOURCE(IDR_MAINMENU);
      wndClass.lpszClassName  = _classname.c_str();
      wndClass.hIconSm        = 0;
  
      if (RegisterClassEx(&amp;wndClass) == 0)// Attemp to register the window class
          throw std::exception("WINDOW ERROR: Failed to register the window class!");
  
      DWORD dwStyle = 0;              // Window styles
      DWORD dwExStyle = 0;            // Extended window styles
  
      dwStyle = WS_OVERLAPPEDWINDOW |        // Creates an overlapping window
                WS_CLIPCHILDREN |            // Doesn"t draw within child windows
                WS_CLIPSIBLINGS;              // Doesn"t draw within sibling windows
  
      //adjust window size
      RECT rMain;
      rMain.left = 0;
      rMain.right = width;
      rMain.top = 0;
      rMain.bottom = height;  
  
      AdjustWindowRect(&amp;rMain, dwStyle, 0);
  
      // Attempt to create the actual window
      _hwnd = CreateWindowEx( dwExStyle,     
                              className,
                              windowTitle,      
                              dwStyle,         
                              0, 0,           
                              rMain.right - rMain.left,
                              rMain.bottom - rMain.top,  
                              nullptr,             
                              0,  
                              nullptr,
                              0); 
  
  
      ShowWindow(_hwnd, SW_SHOW);
      SetForegroundWindow(_hwnd);
      SetFocus(_hwnd);
  </code></pre>