🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #10203

Re: Need help with messages

#10203
From: Remy Lebeau (TeamB)
Date: Tue, 04 May 2004 20:57
22 lines
1748 bytes
"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: <4098050b$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!in.100proofnews.com!in.100proofnews.com!border2.nntp.ash.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <4097f3d1$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: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <4097f3d1$1@newsgroups.borland.com>
Subject: Re: Need help with messages
Date: Tue, 4 May 2004 13:57:21 -0700
Lines: 24
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 67.22.138.253
Message-ID: <4098050b$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1083704587 67.22.138.253 (4 May 2004 14:03:07 -0700)
Path: arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!in.100proofnews.com!in.100proofnews.com!border2.nntp.ash.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail