[Lazarus] An expression is returning false, why?
lubos.pintes at gmail.com
Sun Mar 4 17:58:09 CET 2018
Sorry for possibly stupid subject and maybe off-topic question. In my
UIA code, I am testing if a control has focus. So I have a FControl:
TControl declared in my class.
Now say FControl contains a TForm1 instance, simply we have very simple
program with just an empty window. Then an expression:
Result := FControl is TWinControl and TWinControl(FControl).Focused;
returns false. I am sure the form has focus..., because
ShowMessage(BoolToStr(Focused)) returns -1, which represents true...
More information about the Lazarus