|
|
Relationship control
I always imagined that to make a control like that you would need
to do a lot of custom drawing, but when using the Spy++ tool from the
Developer Studio package, I soon realized that the control was nothing
but a parent window with a number of child windows attached. The child
windows can be any kind of Windows control (including list boxes and regular
windows). The tables in the MS Access control are actually subclassed List box
controls with the
My Relationship control also has support for a list box child control. I also added a subclassed regular window, which allows me to paint a nicely centred caption. The binders (or arrows) that connect the windows are still custom drawn. They are drawn on the parent window's Device Context (DC) so they don't interfere with the painting of the floating child window controls.
This was my first attempt to make a control using the Microsoft WTL library. Source Code DependenciesMicrosoft Visual C++ 6.0Microsoft WTL 3.0 Library Download Files
Written by Bjarke Viksoe. Article submitted 5/21/2000.
|
|||