The information in this article applies to:
SYMPTOMSIf an MFC program uses a CRichEditDoc and a CRichEditView is not the first pane of a splitter window, an access violation occurs when you start the program. CAUSEMFC's CRichEditDoc::GetView always assumes the first view of the active frame window is a CRichEditView. The pointer is returned and used as a CRichEditView object even though it may not be. The crash occurs when you use a data member or function specific to CRichEditView. RESOLUTIONSince GetView is not virtual, it cannot be overriden. When using Visual C++ 4.0 or 4.1, make sure that the first pane is a CRichEditView. STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug has been corrected in the Microsoft Foundation Classes version 4.2 and shipped with Visual C++ version 4.2. MORE INFORMATION
When a CRichEditView is specified during the creation of an MFC program
using AppWizard, a CRichEditDoc derived class is created for the program.
When the rich edit view is initially displayed, the framework calls
CRichEditDoc::SetTitle to update the frame window's title. However,
SetTitle calls GetView, which returns the first view in the view list. Additional query words:
Keywords : kbDocView kbMFC kbVC kbVC400bug kbVC410bug kbVC420fix |
Last Reviewed: July 28, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |