Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / May 2005

Tip: Looking for answers? Try searching our database.

Visual Studio 6 (beginner)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mihai Bozesan - 20 May 2005 11:41 GMT
How can I use InsertMenuItem in Visual Studio 6???
error C2039: 'InsertMenuItemA' : is not a member of 'CMenu'
I have looked up in help and I have done everything they said there.
Tamas Demjen - 20 May 2005 18:12 GMT
> How can I use InsertMenuItem in Visual Studio 6???
>  error C2039: 'InsertMenuItemA' : is not a member of 'CMenu'
> I have looked up in help and I have done everything they said there.

The Win32 API has an InsertMenuItem macro, which (in your case) is
defined as

#define InsertMenuItem InsertMenuItemA

So every time you write InsertMenuItem anywhere in your source code, the
compiler systematically replaces that with InsertMenuItemA, without
thinking whether it's reasonable or not. That's why macros should be
'ALL_CAPITALS', not in 'TitleCase'.

Anyway, the workaround is:
#include <windows.h>
#undef InsertMenuItem

Tom

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.