Also you'll need to re-direct the wndProc to the new window and destroy the original window using DestroyWindow.