Article ID: 150076
Article Last Modified on 9/18/2003
APPLIES TO
- Microsoft Visual C++ 1.0 Professional Edition
- Microsoft Visual C++ 1.5 Professional Edition
- Microsoft Visual C++ 1.51
- Microsoft Visual C++ 1.52 Professional Edition
- Microsoft Visual C++ 1.52 Professional Edition
- Microsoft Visual C++ 2.0 Professional Edition
- Microsoft Visual C++ 2.1
- Microsoft Visual C++ 2.2
- Microsoft Visual C++ 4.0 Standard Edition
- Microsoft Visual C++ 4.1 Subscription
- Microsoft Visual C++ 4.2 Professional Edition
- Microsoft Visual C++ 5.0 Enterprise Edition
- Microsoft Visual C++ 6.0 Enterprise Edition
- Microsoft Visual C++ 5.0 Professional Edition
- Microsoft Visual C++ 6.0 Professional Edition
- Microsoft Visual C++ 6.0 Standard Edition
- Microsoft Visual C++ .NET 2003 Standard Edition
- Microsoft Visual C++ .NET 2002 Standard Edition
This article was previously published under Q150076
SYMPTOMS
When compiling a Microsoft Foundation Class (MFC) application that uses the Windowsx.h header file and calls CWnd::SubclassWindow(), you may get the following error:
CAUSE
The Windowsx.h file is a header that includes message cracker macros to help programmers write more portable Windows-based applications. The header file contains a preprocessor macro named SubclassWindow. The macro bears the same name as the CWnd::SubclassWindow() member function. The macro has two parameters; the member function has only one parameter. The preprocessor tries to expand the symbol SubclassWindow when it is found.
RESOLUTION
You can un-define the macro as follows:
#undef SubclassWindow
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.
REFERENCES
Win32 SDK Books Online.
MFC Class Library Reference.
Additional query words: 1.00 1.50 1.51 1.52 2.00 2.10 2.20 4.00 4.10
Keywords: kberrmsg kbbug kbcpponly kbcompiler KB150076