title: Why does CreateWindowEx not work as expected?
body: <p>I followed the tutorial at:
  <a href="http://www.winprog.org/tutorial/simple_window.html" rel="nofollow">http://www.winprog.org/tutorial/simple_window.html</a></p>
  
  <p>I have a reasonable understanding of what everything in the tutorial is doing and my test program works. I have tried to create a plugin for winamp using the hInstance of the DLL as it is imported and the parent hwnd given to my plugin by winamp. </p>
  
  <p>It gets to the message loop but nothing is visible. </p>
  
  <pre><code>const char windowClassName[] = "LastScrobblerConfig";
  
  WNDCLASSEX wc;
  HWND hwnd;
  MSG msg;    
  
  // the window class
  wc.cbSize           = sizeof(WNDCLASSEX);
  wc.style            = 0;    
  wc.lpfnWndProc      = WinEvents;
  wc.cbClsExtra       = 0;
  wc.cbWndExtra       = 0;
  wc.hInstance        = plugin.hDllInstance;
  wc.hIcon            = LoadIcon(NULL, IDI_APPLICATION);
  wc.hCursor          = LoadCursor(NULL, IDC_ARROW);
  wc.hbrBackground    = (HBRUSH)(COLOR_WINDOW+1);
  wc.lpszMenuName     = NULL;
  wc.lpszClassName    = windowClassName;
  wc.hIconSm          = LoadIcon(NULL, IDI_APPLICATION);
  
  if (!RegisterClassEx(&amp;wc))
  {
      MessageBox(NULL, "Window Registration Failed!", "Error!",
      MB_ICONEXCLAMATION | MB_OK);
      return 0;
  }
  
  hwnd = CreateWindowEx (
      WS_EX_WINDOWEDGE,
      windowClassName, 
      plugin.description,
      WS_TILEDWINDOW,
      CW_USEDEFAULT,
      CW_USEDEFAULT,
      400,
      400,
      plugin.hwndParent,
      NULL,
      plugin.hDllInstance,
      NULL
  );
  
  if (hwnd == NULL)
  {
      MessageBox(NULL, "Window Create Failed!", "Error!",
      MB_ICONEXCLAMATION | MB_OK);
      return 0;
  }
  
  ShowWindow(hwnd, 1);
  UpdateWindow(hwnd);
  
  while(GetMessage(&amp;msg, NULL, 0, 0) &gt; 0)
  {
      TranslateMessage(&amp;msg);
      DispatchMessage(&amp;msg);
  }
  </code></pre>