April 2002
Beginner
413 pages
10h 46m
English
Adding properties to a custom control is the same method used to add properties to any other managed class. In the ShapeControl project, open the ShapeControl.h file. Within the public section of the ShapeControl class, you will create a property using the __property keyword. As you'll recall from other hours within this book, such as Hour 17, “Interfaces,” each property can have a getter and setter function. Because you want clients using the control to both retrieve the current shape and set the current shape of your control, you will be creating both.
The property you will be creating, however, will be a String object. If you were to create a property to a Shape enumerated data type, then when the person ...
Read now
Unlock full access