Print Page | Close Window

Using Accessibility to get "handle" of XTPToolBar

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=17018
Printed Date: 29 June 2024 at 1:21am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Using Accessibility to get "handle" of XTPToolBar
Posted By: Singlemalt
Subject: Using Accessibility to get "handle" of XTPToolBar
Date Posted: 27 July 2010 at 10:26pm
Hi, new user, currently evaluating the product.

I am trying to use the Windows API method AccessibleObjectFromWindow to retrieve the XTPToolBar "handle" from an application.

I found a related forum post here, that was unfortunately never brought to closure: http://forum.codejock.com/forum_posts.asp?TID=12815

The general method is as such, using Microsoft word as an example:

Word::Window* pWindow = NULL;
HRESULT hr = AccessibleObjectFromWindow(hwnd, OBJID_NATIVEOM, __uuidof(Word::Window), (void**)&pWindow);


To use this effectively, you need to know the correct object declaration, in this case, "Word::Window".  I understand that Codejock provides access to the objects via this Windows API, however I can not find documentation for which object to use here.

I assume it is something like "CXTPToolBar::xyz".  Does anyone know what xyz needs to be here?  Maybe point me to the correct documentation?  Even better, anyone have a code fragment they would be so kind to share?





Replies:
Posted By: Oleg
Date Posted: 28 July 2010 at 4:58am
You use MFC version ? Then why you just can't take pToolBar->m_hWnd ?

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Singlemalt
Date Posted: 28 July 2010 at 6:49am
Hi Oleg, thanks for responding.  The question is the same as in the other thread I linked to.  Reading back, I guess I forgot to mention that , sorry.  The objective is to get the menu handle from another application that uses your toolkit.

In that other thread, you said: "You have call AccessibleObjectFromWindow for Menu window - see it in Spy++ - its window with XTPToolBar class."  Spy++ does indeed show the class of the menu I am targeting is "XTPToolBar".  However, in that other thread, the parameters for the call to AccessibleObjectFromWindow were not detailed, and in fact, I can not locate those details in the documentation.

Thanks.


Posted By: Singlemalt
Date Posted: 29 July 2010 at 11:29pm
No way to do this then, I guess?

Bummer.


Posted By: Singlemalt
Date Posted: 02 August 2010 at 9:18pm
Bumping in case there is a solution.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net