Article View: borland.public.cppbuilder.nativeapi
Article #10251Re: Need help with messages
From: Mike
Date: Mon, 10 May 2004 17:18
Date: Mon, 10 May 2004 17:18
44 lines
2261 bytes
2261 bytes
Remy, Thanks for the response, I have just returned from a trip so sorry I didn't thank you earlier. Although word will be one of the areas I need to look at in respect to this issue, there will be other applications as well, so do you know of any sample code that would show me how to disable menu items in other aplications. Sure would appreciate the advice. Thanks Mike "Remy Lebeau (TeamB)" <gambit47.no.spam@no.spam.yahoo.com> wrote in message news:4098050b$1@newsgroups.borland.com... > > "mike" <mfbrowne@earthlink.net> wrote in message > news:4097f3d1$1@newsgroups.borland.com... > > > My problem is how do I disable a menu option in word from my application. > > MSWord does not use standard menus to begin with. It uses its own custom > menu control called "MsoCommandBar". Thus you will not be able to use the > menu-related functions of the Win32 API for manipulating such menus. > > What you can try, though, is using the AccessibleObjectFromWindow() function > to get a suitable IAccessible COM interface for the menu control: > > AccessibleObjectFromWindow > http://msdn.microsoft.com/library/en-us/msaa/msaaccrf_2r7b.asp > > Then you can manipulate the menu via Office's native API via COM. Refer to > the Microsoft Office SDK docs for information about working with Command > Bars in general. > > > Gambit > >
Technical Details
Message-ID:
<409fb9aa$2@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4097f3d1$1@newsgroups.borland.com> <4098050b$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,1ccc5371f06ed04 X-Google-Attributes: gid10cc67,public From: "Mike" <mfbrowne@earthlink.net> Newsgroups: borland.public.cppbuilder.nativeapi References: <4097f3d1$1@newsgroups.borland.com> <4098050b$1@newsgroups.borland.com> Subject: Re: Need help with messages Date: Mon, 10 May 2004 13:18:49 -0400 Lines: 46 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 24.95.235.163 Message-ID: <409fb9aa$2@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1084209578 24.95.235.163 (10 May 2004 10:19:38 -0700) Path: arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail