Windows Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsWindows Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old September 11th, 2003, 03:06 AM
ice_nin ice_nin is offline
Dude' Where's My JD and Coke
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Newbury, England
Posts: 37 ice_nin User rank is Private First Class (20 - 50 Reputation Level)ice_nin User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via ICQ to ice_nin Send a message via AIM to ice_nin Send a message via Yahoo to ice_nin
Accessibility API's

I have asked this question all over the place and have not got any response, so this is my last hope.

I am using the API AccessibleObjectFromWindow( ... ) to find the menu bar of an office application. I am using this function in conjunction with the OBJID_NATIVEOM param to get the native object model of the commandbar. The function works and returns S_OK. The problem is that the object returned is an IAccessible* I use query interface to see the object supports the command bar interface and low and behold it doesn't. By examining the object returned I can see that it is the command bar because it has all of the properties. i.e. Name, Role, even position.

If anyone knows how to get this to work I would be very grateful if you could explain how. Any suggestion, tips or comments would be appreciated.

Just for reference here is a very very cut down version of the code. It is hosted in a C++ Com DLL that is being called by a VB.Net Client (I know VB.Net isn't the best choice of client, but they are making me use it because they "can’t afford to re-train staff to uses C++")

STDMETHODIMP CUtils::GetMenu(IDispatch** ppMenu)
{
IDispatch * pDisp = NULL;

HWND hWnd = FindWindowEx(GetDesktopWindow(), NULL, "wndclass_desked_gsk",NULL);
hWnd = FindWindowEx(hWnd, NULL, "MsoCommandBarDock", "MsoDockTop");
hWnd = FindWindowEx(hWnd, NULL, "MsoCommandBar", "MenuBar");

AccessibleObjectFromWindow(hWnd, OBJID_NATIVEOM, IID_IDispatch, (void**) ppMenu);
return S_OK;
}

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsWindows Help > Accessibility API's


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway