主要问题:将所选文本的文本范围与当前站点上的文档范围(在IE中显示)进行比较时,无法让CompareEndpoints给出“1”以外的任何值。//InitializerangevariablesIUIAutomationTextRange*documentRange=NULL;IUIAutomationTextRange*selectionRange=NULL;IUIAutomationTextRangeArray*selectionRangeArray=NULL;//Getentiretextdocumentrangem_pTextPattern->get_DocumentRange