FIX: MFCVBX with MODEL_fChildrenOk Set Causes GP FaultLast reviewed: September 19, 1997Article ID: Q142350 |
1.50 1.51 1.52
WINDOWS
kbprg kbbuglist kbfixlist
The information in this article applies to:
SYMPTOMSThere's a bug in the MFCVBX sample that's described in the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q123377 TITLE : SAMPLE: MFCVBX Implements a VBX Control Using MFCThe MFCVBX sample shows how to create a VBX control using MFC. If this sample is used as an approach for creating a VBX control and the MODEL_fChildrenOk flag is also used, then the VBX control causes a general protection (GP) fault.
CAUSEA GP fault could occur for a number of reasons, but in particular it will happen if a combo box is placed on the VBX control. The sample code does not correctly handle the case where a message handler needs to call the default message procedure. It does not set MFC's internal structure, which stores the previous message. Therefore, when the default message handler is called, it is called with the incorrect message (and parameters).
RESOLUTIONModify the CircleCtlProc function located in the Mfcvbx.cpp file in the sample. Make the following changes:
STATUSMicrosoft has confirmed this to be a bug in the MFCVBX sample. This problem has been corrected. To obtain the latest version of the sample, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q123377 TITLE : SAMPLE: MFCVBX Implements a VBX Control Using MFC REFERENCESFor more information on the MODEL_fChildrenOk flag and what it is used for, please see: Visual Basic 3.0: VB API Reference Help.Data Structures.MODEL FlagsVisual Control Pack 1.0: VCP CDK Help.Data Structures.MODEL Flags |
Additional reference words: 1.50 1.51 1.52b 2.50 2.51 2.52 2.52b vb
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |