FIX: C2248 Error When Calling CView::OnInitialUpdate()Last reviewed: September 18, 1997Article ID: Q113534 |
1.00 | 1.00WINDOWS | WINDOWS NT kbprg kbfixlist kbbuglist The information in this article applies to:
SYMPTOMSAttempting to call CView::OnInitialUpdate() from a non-CView derived class causes the compiler to generate the following error message:
error C2248: 'OnInitialUpdate' : cannot access protected member declared in class 'CView' CAUSEThe CView class contains the function OnInitialUpdate(), which is called by the framework after the view is attached to a document but before the view is initially displayed. OnInitialUpdate() is declared as a protected member of the CView class. Protected member functions cannot be accessed by objects of another class type unless that class is derived from the protected member function's class or is declared to be a friend of the protected member function's class.
STATUSMicrosoft has confirmed this to be a problem in the Microsoft Foundation Classes (MFC) version 2.0. The problem was corrected in MFC version 2.5 and MFC version 3.0.
RESOLUTIONTo work around this problem, do one of the following:
|
Additional reference words: 1.00 2.00 2.10 CScrollView CFormView
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |