Article ID: 148222 - Last Review: November 21, 2006 - Revision: 5.1 How to update property values in a property page by using Visual C++This article was previously published under Q148222 Note Microsoft Visual C++ .NET (2002) supports both the managed code model that is provided by the Microsoft .NET Framework and the unmanaged native Microsoft Windows code model. All or part of the information in this article applies to managed Visual C++ code. You can apply this information only by using the .NET Framework. Microsoft Visual C++ 2005 supports both the managed code model
that is provided by the Microsoft .NET Framework and the unmanaged native Microsoft Windows code
model. On This PageSUMMARY To modify a property of an OLE control, you would normally
change the properties value in the control's property page. However, it is
possible for a property to be modifiable from more than one property page
especially in development environments such as Visual Basic. In this case, when
you change the property in the control's property page, you should synchronize
the value in Visual Basic's Property Form. This article shows by example how to
do it. MORE INFORMATION For example, in Visual Basic, place the Circ3 sample
control on the Form page. Then click the right mouse button to select
properties for the control. You will notice that the same properties can be
seen in Visual Basic's Properties window. For example, one of the properties of
Circ3 is the CircleOffset property. If you change this value in the Control's
property page and click Apply, you will notice that the value has not been
updated in Visual Basic's Properties window. To synchronize the value in both,
you need to call BoundPropertyChanged(dispid) for each property you want to
update. Note The dispid is the id of the property to update. It is usually found in the header file of the COleControl-derived class. The dispids for the Circ3 control follow: Sample codeAPPLIES TO
| Article Translations
|

Back to the top
