[nvda-addons] Re: Getting the handle of the current window and its parent upon a focus change

  • From: "Pranav Lal" <pranav.lal@xxxxxxxxx>
  • To: <nvda-addons@xxxxxxxxxxxxx>
  • Date: Sat, 28 Feb 2015 12:42:04 +0530

Hi Joseph,

<snip  Alternatively, you can have an overlay object that'll intercept the gain
focus event and will pass its handle to the appropriate function.
PL] I want this to be a global plugin so I suspect the above approach will be
better. I do not want to interfear with any other addon that is intersepting the
gain focus event.

Pranav
-----Original Message-----
From: nvda-addons-bounce@xxxxxxxxxxxxx [mailto:nvda-addons-bounce@xxxxxxxxxxxxx]
On Behalf Of Joseph Lee
Sent: Saturday, February 28, 2015 12:13 PM
To: nvda-addons@xxxxxxxxxxxxx
Subject: [nvda-addons] Re: Getting the handle of the current window and its
parent upon a focus change

Hi,
Yes. In the add-on code, create event_gainFocus event that'll be fired when an
object gets focus. In the event, prepare a variable to receive the window handle
for the desired control and pass it to whatever that requires it.
Alternatively, you can have an overlay object that'll intercept the gain focus
event and will pass its handle to the appropriate function.
Cheers,
Joseph

-----Original Message-----
From: nvda-addons-bounce@xxxxxxxxxxxxx
[mailto:nvda-addons-bounce@xxxxxxxxxxxxx] On Behalf Of Pranav Lal
Sent: Friday, February 27, 2015 10:03 PM
To: nvda-addons@xxxxxxxxxxxxx
Subject: [nvda-addons] Getting the handle of the current window and its parent
upon a focus change

Hi all,

I hope this question is appropriate for this list. I am working on an
experimental add-on which will echoback what is transcribed from dragon
naturally speaking. There are 2 approaches for this. One approach involves the
use of the windows api and deals with message callbacks. I would prefer not have
to go down this route. The second approach is using .net and various components.
One problem with the second approach is that I need to pass window handles to
the addon so that the dragon edit control can be associated with the control
where dictation has to happen. I need the handle of the current window and its
parent. Is it possible to get these from NVDA when the focus changes?

Pranav

----------------------------------------------------------------
NVDA add-ons: A list to discuss add-on code enhancements and for reporting bugs.


Community addons are available from: http://addons.nvda-project.org To send a
message to the list: nvda-addons@xxxxxxxxxxxxx To change your list
settings/unsubscribe: //www.freelists.org/list/nvda-addons
To contact list moderators: nvda-addons-moderators@xxxxxxxxxxxxx

----------------------------------------------------------------
NVDA add-ons: A list to discuss add-on code enhancements and for reporting bugs.


Community addons are available from: http://addons.nvda-project.org To send a
message to the list: nvda-addons@xxxxxxxxxxxxx To change your list
settings/unsubscribe: //www.freelists.org/list/nvda-addons
To contact list moderators: nvda-addons-moderators@xxxxxxxxxxxxx

----------------------------------------------------------------
NVDA add-ons: A list to discuss add-on code enhancements and for reporting 
bugs. 

Community addons are available from: http://addons.nvda-project.org
To send a message to the list: nvda-addons@xxxxxxxxxxxxx
To change your list settings/unsubscribe: 
//www.freelists.org/list/nvda-addons
To contact list moderators: nvda-addons-moderators@xxxxxxxxxxxxx

Other related posts: