PRB: ClassWizard Doesn't Support Property Change NotificationsLast reviewed: February 17, 1998Article ID: Q146446 |
The information in this article applies to:
SYMPTOMSClassWizard makes adding event handlers in an OLE control container much easier by providing the required macros, function declarations, and the function body. However, ClassWizard currently doesn't provide support to add handlers for property change requests and property change notifications. You must manually add the macros, function declarations, and the function body required for defining an event sink map entry in order to handle property change notifications. This article explains the steps necessary for handling one such property change notification.
RESOLUTIONThe following steps illustrate how to handle property change notifications for the "Caption" stock property of the Circ3 sample control in a dialog based control container application:
MORE INFORMATIONAn OLE control container would typically implement IPropertyNotifySink in order to receive notifications about property changes from an OLE control. The control container creates a sink with this interface and connects it to the control through the connection point mechanism. The OLE control itself is required to call the methods of IPropertyNotifySink only for those properties marked with the [bindable] and [requestedit] attributes in the object's type information. When the control is about to change a [requestedit] property, it must call IPropertyNotifySink::OnRequestEdit before changing the property and must also honor the action by the sink on return from this call. Also, when the control changes a [bindable] property, it is required to call IPropertyNotifySink::OnChanged. An OLE control will send these notifications only for property changes occurring after it is fully constructed and initialized.
REFERENCESOnline documentation for ON_PROPNOTIFY and ON_PROPNOTIFY_RANGE. Online documentation for Property Change Notification.
|
Additional query words: ocx ole control cdk
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |