FIX: CControlBar OnCreate Implementation Missing

Last reviewed: September 18, 1997
Article ID: Q113293
1.00 WINDOWS kbprg kbfixlist kbbuglist

The information in this article applies to:

  • The Microsoft Foundation Classes (MFC) included with: Microsoft Visual C++ for Windows, version 1.0

SYMPTOMS

If a call to CControlBar::OnCreate() is located in the source code of a project, the linker reports an L2029 unresolved external error but no compiler errors are reported. This problem occurs even when the correct Microsoft Foundation Class )MFC) library is linked into the project.

CAUSE

The AFXEXT.H file defines the class CControlBar. In the message map section, an OnCreate member is listed. The prototype is:

   afx_msg int OnCreate(LPCREATESTRUCT lpcs);

Although this member function is prototyped in the header file, it is not actually implemented in the MFC libraries. This can be verified by examining the source code for the CControlBar class, which is located in the file BARCORE.CPP under the \MSVC\MFC\SRC directory. When attempting to call CControlBar::OnCreate(), this results in an unresolved external error, L2029, from the linker.

STATUS

This prototype was incorrectly listed in the AFXEXT.H header file for the CControlBar class and can be deleted from the include file. The prototype has been removed from the header file in the Microsoft Foundation Classes version 2.5. The prototype was also removed from the header file from the Microsoft Foundation Classes version shipped with Visual C++, 32-bit Edition, version 1.0.


Additional reference words: 1.00 2.00
KBCategory: kbprg kbfixlist kbbuglist
KBSubcategory: MfcUI
Keywords : kb16bitonly MfcUI kbbuglist kbfixlist kbprg
Technology : kbMfc
Version : 1.00
Platform : WINDOWS
Solution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 18, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.