added check for existing HWND used in WinXP