Don't use GetParent to get the parent window, as it also may return the owner window