September 15th, 2003, 04:28 AM
MSO Command Bar
Does anyone know how to get from this:
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);
to a CommandBar object i.e. MSO::_CommandBarPtr.
I have looked at MSDN and it says that it should work and give me back the object model to the command bar, I just cant seem to get it working. HELP!!
Thanks in advance