Try sending the WM_CLOSE message