The information in this article applies to:
SYMPTOMSAn attempt to use the message-map mechanism provided by the Microsoft Foundation Classes fails and the compiler generates the following message:
CAUSEThe function declarations in the message map do not match the function prototypes declared in the AFXWIN.H file. RESOLUTIONCompare the message-handler function prototypes in your application to those in the AFXWIN.H file. Verify that the parameter types and return types match. MORE INFORMATION
Functions that process Windows messages can be defined as member
functions of a derived window class. To use the message-routing
mechanism the Microsoft Foundation Classes provided by the
DECLARE_MESSAGE_MAP, BEGIN_MESSAGE_MAP, and END_MESSAGE_MAP functions,
the function declarations in the derived class must exactly match the
function parameters specified in AFXWIN.H.
The AFXWIN.H file and the ERRATA2.TXT file provided with C/C++ version
7.0 list the corrected function prototypes as follows:
The "Class Libraries Reference" manual for C/C++ version 7.0 and the
online help for C/C++ version 7.0 and Visual C++ version 1.0
incorrectly document the prototype for the following message-handler
function:
The AFXWIN.H and ERRATA2.TXT files list the corrected function
prototype as follows:
The online help for Visual C++ version 1.5 and Visual C++ 32-bit Edition
has the correct information.
The following message-handler functions are not listed in the "Class Libraries Reference" manual, but they are listed in the online help:
The message-handler function prototypes in the AFXWIN.H file are
correct.
This message can also be caused from using the ON_MESSAGE macro (in MFC 2.0) with command handler classes such as CDocument or CWinApp. This is because these classes aren't derived from CWnd, and the ON_MESSAGE macro doesn't make sense in non-CWnd derived classes. Additional query words: 7.00 1.00 2.00 2.10 afx
Keywords : |
Last Reviewed: December 21, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |