Hello again,
I am hunting for hard-to-find bug and have no idea where it happens.
Now I would like to ask about correct way of adding a new message into the Win32WidgetSet. Chances are that I am doing it incorrectly. I need to handle a WM_GETOBJECT message, and I did it as follows:

    WM_GETOBJECT: with WindowInfo^ do
      if(WinControl <> nil) and(LParam = UiaRootObjectId) then begin
        Provider := TUIAControl(WinControl.GetAccessibleObject.Handle);
Exit(UiaReturnRawElementProvider(Window, WParam, LParam, Provider));
      end
      else Exit(CallDefaultWindowProc(Window, Msg, WParam, LParam));

I added this into  TWindowProcHelper.DoWindowProc: LResult;
Provider is the IRawElementProviderSimple interface and TUIAControl is a class implementing it based on information obtained from T(Win)Control.

I can confirm that Inspect can see the object(s). But one symptom I am receiving that a screen reader is unable to register that a form receives the focus. If I alt-tabbing, I hear "Project1", instead of "Form1". But when I place for example a button to the form, it is reported correctly. And when I place a TLabel on the form, I receive a bug I described in another thread.

So now I stopped here and am unable to continue. I added a trace information into every function I implemented to see what is happening, but I have no idea what is bad there...
Hope someone will be able to understand this. :)
Thanks!

Dňa 8. 10. 2017 o 22:09 Lubos Pintes via Lazarus napísal(a):
Hello,
If I want to add a functionality like accessibility to WidgetSet, which package could I use, lcl.lpk, or lclbase.lpk? Also, how can I rebuilt the package when I modify/add some unit? Do I need to always rebuild the IDe, or there is a quicker way? I am thinking about syntax check / quick compilation to incrementally check and fix semantic / syntax errors.

Thanks



--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to