title: Why does DestroyWindow close my application?
body: <p>I'v created a window after creating my main one but calling DestroyWindow on its handle closes the entire application, how can I simply get rid of it?</p>
  
  <p>it looks like this:</p>
  
  <pre><code>BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
  {
     HWND hWnd;
     HWND fakehandle;
  
  
     hInst = hInstance; // Store instance handle in our global variable
  
     hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW | WS_EX_LAYERED,
        CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);
  
     fakehandle = CreateWindow(szWindowClass, "FAKE WINDOW", WS_OVERLAPPEDWINDOW,
         CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);
  
     if (!hWnd || !fakehandle)
     {
        return FALSE;
     }
  //some code
     DestroyWindow(fakehandle);
  
  
     ShowWindow(hWnd, nCmdShow);
     UpdateWindow(hWnd);
  
     return TRUE;
  }
  </code></pre>
  
  <p>how can I destroy this window without destroying my main one? I'm creating a dummy window to check for multisampling in OpenGL.</p>
  
  <p>Thanks</p>