FIX: HIERSVR Sample GetClipboardData() Parameters IncorrectLast reviewed: September 18, 1997Article ID: Q117870 |
1.50
WINDOWS
kbprg kbfixlist kbbuglist
The information in this article applies to:
SYMPTOMSThe HIERSVR sample for the MFC, version 2.5, incorrectly overrides the virtual function OnGetClipboardData()in its COleServerItem-derived class, CServerItem. This does not allow the sample to register its Clipboard format.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This problem was fixed in MFC version 2.51, which is distributed with Visual C++, version 1.51.
MORE INFORMATIONThe prototype for OnGetClipboardData in the base class is
virtual COleDataSource* COleServerItem::OnGetClipboardData(BOOL bIncludeLink, LPPOINT pptOffset, LPSIZE pSize);while the prototype in the derived class, CServerItem, is
virtual COleDataSource* CServerItem::OnGetClipboardData(BOOL bIncludeLink, CPoint *pptOffset, CSize* pSize);These functions have different function signatures, so the compiler views them as separate, overloaded functions. As a result, the framework always calls the base class version. In HIERSVR, this means that GetClipboardData() does not get called and the application's native Clipboard format is not posted to the Clipboard. The following steps demonstrate this problem and a workaround:
|
Additional reference words: 1.50 2.50
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |