get the right parent window hwnd