Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

The bounding rectangle of an input control getting by UIAutomation is not up-to-date

  • 1 reply
  • 0 have this problem
  • 1 view
  • Last reply by cor-el

more options

I'm using UIAutomation to get the bounding rectagle of an input control. Here's my C++ code.

IUIAutomation* p_iui; ... IUIAutomationElement* p_fcs_element; while(TRUE) {

   Sleep(1000);
   p_iui->GetFocusedElement(&p_fcs_element);
   RECT r;
   p_fcs_element->get_CurrentBoundingRectangle(&r);
   _cprintf("Rect: %d,%d,%d,%d\n", r.left, r.top, r.right, r.bottom);

}

When I put focus on some input text area and move Firefox by drag&drop, the RECT r's data(left,top,right,bottom)does not change, unless I change the focus to another text area and back to the first one. Should I change some Firefox settings to make the location information up-to-date when get_CurrentBoundingRectangle every time?

I'm using UIAutomation to get the bounding rectagle of an input control. Here's my C++ code. '''IUIAutomation* p_iui; ... IUIAutomationElement* p_fcs_element; while(TRUE) { Sleep(1000); p_iui->GetFocusedElement(&p_fcs_element); RECT r; p_fcs_element->get_CurrentBoundingRectangle(&r); _cprintf("Rect: %d,%d,%d,%d\n", r.left, r.top, r.right, r.bottom); }''' When I put focus on some input text area and move Firefox by drag&drop, the RECT '''r's data(left,top,right,bottom)'''does not change, unless I change the focus to another text area and back to the first one. Should I change some Firefox settings to make the location information up-to-date when '''get_CurrentBoundingRectangle''' every time?
Attached screenshots

All Replies (1)

more options

Try to ask advice on a web development oriented forum.