473,395 Members | 1,556 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,395 software developers and data experts.

afxComCtlWrapper undeclared identifier

I am investigating the upgrade of a VC++ 6 project to build in VS 2005.

There is a compiler error in one of the MFC files - afxcomctl32.inl.
The message is: error C2065: 'afxComCtlWrapper' : undeclared identifier.

The odd thing is that if I hover over afxComCtlWrapper in the source
code, the intellisense shows that it is declared and right-click "Go to
Declaration" takes me to line 25 of afxwin.h which contains

#define afxComCtlWrapper
static_cast<CComCtlWrapper*>(AfxGetModuleState()->m_pDllIsolationWrappers[_AFX_COMCTL32_ISOLATION_WRAPPER_INDEX])

I'm confused. How can the IDE find the declaration but suffer amnesia
when it comes to build the project?

My best guess is that a project setting or something in one of our
header files somewhere is somehow undefining the symbol. Some of the
source was written over 10 years ago and uses a mixture of MFC, ATL, STL
contributed by a lot of different people so it wouldn't be the first
time we've found something strange which might have made sense at the
time but caused problems down the line.

I can't find anything useful on Google groups or web search, can anyone
offer any suggestions as to what to try next?

Thanks,
Ian
Jan 5 '06 #1
4 3632
Is it possible for you to post a code snippet that reproduces this behaviour
so that we can see what happens exactly?

without that, my only guess is that VC_EXTRA_LEAN or WIN32_LEAN_AND_MEAN is
defined, which excluded some stuff from the header files.

kind regards,
Bruno.

"Ian Harding" wrote:
I am investigating the upgrade of a VC++ 6 project to build in VS 2005.

There is a compiler error in one of the MFC files - afxcomctl32.inl.
The message is: error C2065: 'afxComCtlWrapper' : undeclared identifier.

The odd thing is that if I hover over afxComCtlWrapper in the source
code, the intellisense shows that it is declared and right-click "Go to
Declaration" takes me to line 25 of afxwin.h which contains

#define afxComCtlWrapper
static_cast<CComCtlWrapper*>(AfxGetModuleState()->m_pDllIsolationWrappers[_AFX_COMCTL32_ISOLATION_WRAPPER_INDEX])

I'm confused. How can the IDE find the declaration but suffer amnesia
when it comes to build the project?

My best guess is that a project setting or something in one of our
header files somewhere is somehow undefining the symbol. Some of the
source was written over 10 years ago and uses a mixture of MFC, ATL, STL
contributed by a lot of different people so it wouldn't be the first
time we've found something strange which might have made sense at the
time but caused problems down the line.

I can't find anything useful on Google groups or web search, can anyone
offer any suggestions as to what to try next?

Thanks,
Ian

Jan 5 '06 #2
Bruno van Dooren wrote:
Is it possible for you to post a code snippet that reproduces this behaviour
so that we can see what happens exactly?

without that, my only guess is that VC_EXTRA_LEAN or WIN32_LEAN_AND_MEAN is
defined, which excluded some stuff from the header files.

kind regards,
Bruno.


Got it! stdafx.h contained this:

#define _AFX_NO_DAO_SUPPORT
#define _AFX_NO_AFXCMN_SUPPORT

#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions

#ifndef _AFX_NO_OLE_SUPPORT
#include <afxole.h> // MFC OLE classes
#include <afxodlgs.h> // MFC OLE dialog classes
#include <afxdisp.h> // MFC OLE automation classes
#endif // _AFX_NO_OLE_SUPPORT

#ifndef _AFX_NO_DB_SUPPORT
#include <afxdb.h> // MFC ODBC database classes
#endif // _AFX_NO_DB_SUPPORT

#ifndef _AFX_NO_DAO_SUPPORT
#include <afxdao.h> // MFC DAO database classes
#endif // _AFX_NO_DAO_SUPPORT

#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows 95 Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT

When I commented out #define _AFX_NO_AFXCMN_SUPPORT the errors disappeared.

Ian

Jan 5 '06 #3
Ted
I highly recommend you also get rid of _AFX_NO_DAO_SUPPORT as this will
cause serious crashes in your program (causing a structure member in
afxstat_.h to be left out, thereby causing the structure members after it to
be in the wrong position) More info here (on the last page of the thread)

http://forums.microsoft.com/MSDN/Sho...68836&SiteID=1

Ted.

"Ian Harding" <ih*********@hotmail.com> wrote in message
news:42*************@individual.net...
Bruno van Dooren wrote:
Is it possible for you to post a code snippet that reproduces this
behaviour so that we can see what happens exactly?

without that, my only guess is that VC_EXTRA_LEAN or WIN32_LEAN_AND_MEAN
is defined, which excluded some stuff from the header files.

kind regards,
Bruno.


Got it! stdafx.h contained this:

#define _AFX_NO_DAO_SUPPORT
#define _AFX_NO_AFXCMN_SUPPORT

#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions

#ifndef _AFX_NO_OLE_SUPPORT
#include <afxole.h> // MFC OLE classes
#include <afxodlgs.h> // MFC OLE dialog classes
#include <afxdisp.h> // MFC OLE automation classes
#endif // _AFX_NO_OLE_SUPPORT

#ifndef _AFX_NO_DB_SUPPORT
#include <afxdb.h> // MFC ODBC database classes
#endif // _AFX_NO_DB_SUPPORT

#ifndef _AFX_NO_DAO_SUPPORT
#include <afxdao.h> // MFC DAO database classes
#endif // _AFX_NO_DAO_SUPPORT

#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows 95 Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT

When I commented out #define _AFX_NO_AFXCMN_SUPPORT the errors
disappeared.

Ian

Jan 5 '06 #4
Thanks Ted, I'm going to check the other projects as well.

Ian

Ted wrote:
I highly recommend you also get rid of _AFX_NO_DAO_SUPPORT as this will
cause serious crashes in your program (causing a structure member in
afxstat_.h to be left out, thereby causing the structure members after it to
be in the wrong position) More info here (on the last page of the thread)

http://forums.microsoft.com/MSDN/Sho...68836&SiteID=1

Ted.

Jan 11 '06 #5

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

Similar topics

3
by: Saurabh Aggrawal | last post by:
Hi, if (iter->m_name.compare(pstrName) == 0) { // Provide our object. *ppunkItem = iter->m_pUnknown; // Addref our object... iter->m_pUnknown->AddRef(); break; }
5
by: Marc Gustafson | last post by:
This function is executed when a application file is double-clicked to open in a VC++ application. Specifically, this function is enabled by RegisterShellFileTypes () in the application's...
0
by: Stephanie Doherty | last post by:
Hello World, I am trying to use a _spawnl function like this (and I have included the process.h file): _spawnl(_P_WAIT,iporgfile,iporgfile,NULL); It compiles with the following errors: ...
0
by: August97 | last post by:
I am upgrading VS 5 code to VS 2005. In this, I receive following error, error C2065: 'afxComCtlWrapper' : undeclared identifier I checked my StdAfx,h & commented out #define VC_EXTRALEAN....
2
by: aarthi28 | last post by:
Hi, I have this code that I am trying to compile, but I am getting the following errors 'CoInitializeSecurity': identifier not found 'EOAC_NONE' : undeclared identifier I have pasted the...
5
by: vmagana | last post by:
First of all I would like to indicate that I am a newbie a programming. I am having a problem compiling a sample source code that I downloaded from microsoft. When I try to build the program I get...
3
by: Anna Smidt | last post by:
Thanks for the help so far. I have some problems left. One of them is an undeclared identifier, but it's unclear to me why the compiler fights with me. It says "iter: undeclared identifier" I...
6
by: muby | last post by:
Hi everybody :) I'm modifying a C++ code in VC++ 2005 my code snippet void BandwidthAllocationScheduler::insert( Message* msg, BOOL* QueueIsFull,
1
by: LuxCkrown | last post by:
Hey everyone, i've been browsing for a fix to my problem 1>c:\documents and settings\user\desktop\judis_repack\judis repack\judis repack\maplestoryserver\inventory.cpp(386) : error C2065: 'amount'...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...

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.