473,406 Members | 2,710 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Visual Studio 6 (beginner)

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.

--------------------------------
From: Mihai Bozesan

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>1/XJer0wV0e1fEiRjk6neg==</Id>
Nov 17 '05 #1
1 1224
Mihai Bozesan via .NET 247 wrote:
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
Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: angelag | last post by:
I am currently taking a college course in Visual Basic.Net and I am a beginner. I bought Visual Studio.Net 2003 to do my homework at home. I built my first project and e-mailed it to myself at...
8
by: Raghuraman | last post by:
Hai ! I use the Grid control with the data environment and the recordset control by dragging from the data env. But if i run the page alone in the iexplorer it tells the error like pm.script...
4
by: IS | last post by:
At the recommendation of several people in this newsgroup I have downloaded two or three Compilers. One is the Beta version of Microsoft's Visual C++ 2005. I have entered a complete beginner code...
2
by: zatenay | last post by:
Hey, I'm a beginner with Visual Studio and C++, so I've the following problem : when I run a program with Debug-Start without debugging command, I can't see the output, so I have to run it...
9
by: Trevor | last post by:
I am just learning c# and I have a book entitled "Programming c#" O'Reilly. It strongly recommends Visual .Net. Can anyone enlighten me on their experiences of SDK versus Visual ..Net?
4
by: Peter Gloor | last post by:
Hello, I have some difficulties to understand the new concepts for data handling and data access in Visual C# 2005 Windows applications. The questions are when and how to use which component...
3
by: RS | last post by:
Hi all, My code compiles well with gcc on linux and OS X, but now I have to run it at work, and my only choice is Visual Studio .Net 2003 environment on windows, which I had never used before....
8
by: HELLO $$$ | last post by:
To those who are familiar to MS Visual studio : I have recently Visual Studio 2005. Please can any body tells me , when I write a code: How can I separate the files of such code from the Studio...
28
by: grappletech | last post by:
I took Pascal and BASIC in a couple of beginner programming courses about a decade ago and did well with them. I am good with pseudocode, algorithms, and the mathematics of programming. I decided...
6
by: raylopez99 | last post by:
Will ASP.NET 3.0 work under Visual Studio 2005? And what is a good newbie ASP.NET book? Subject: Will ASP.NET 3.0 work under Visual Studio 2005? And what is a good newbie ASP.NET book? My...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.