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

Lolu chungechunge lwabekwa kunqolobane. Uyacelwa ubuze umbuzo omusha uma udinga usizo.

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

  • 1 baphendule
  • 0 zinale nkinga
  • 2 views
  • Igcine ukuphendulwa ngu 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?
Ama-screenshot ananyekiwe

All Replies (1)

more options

Try to ask advice on a web development oriented forum.