title: RegisterClassEx Fails as Invalid Parameter - C++
body: <p>A call to <code>RegisterClassEx</code> in my application is failing with error code 87, "The parameter is incorrect."</p>
  
  <pre><code>memset( &amp;m_wcx, 0, sizeof(WNDCLASSEX) );
  
  m_wcx.cbSize = sizeof(WNDCLASSEX);  // size of structure
  m_wcx.style = WS_ICONIC;            // initially minimized
  m_wcx.lpfnWndProc = &amp;WndProc;       // points to window procedure
  m_wcx.cbClsExtra = 0;               // no extra class memory
  m_wcx.cbWndExtra = 0;               // no extra window memory
  m_wcx.hInstance = m_hInstance;      // handle to instance
  m_wcx.hIcon = ::LoadIcon( NULL, IDI_APPLICATION ); // default app icon
  m_wcx.hCursor = ::LoadCursor( NULL, IDC_ARROW ); // standard arrow cursor
  m_wcx.hbrBackground = NULL;         // no background to paint
  m_wcx.lpszMenuName = NULL;          // no menu resource
  m_wcx.lpszClassName = _pwcWindowClass; // name of window class
  m_wcx.hIconSm = NULL;               // search system resources for sm icon
  
  m_atom = ::RegisterClassEx( &amp;m_wcx );
  
  if ( m_atom == 0 )
  {
      TRACE(_T("CNotifyWindow::CNotifyWindow : Failed to register window class.\r\n\tError: %d\r\n\tFile: %s\r\n\tLine: %d\r\n"), ::GetLastError(), __WFILE__, __LINE__);
      THROW(::GetLastError());
  }
  </code></pre>
  
  <p>Does anyone know what I'm doing wrong?  Thanks.</p>