First, create goals
Create a list control similar to the left part of the Windows XP window, as shown in the following illustration
Users are free to add list members
Controls can be collapsed and stretched, and only the title bar is displayed when collapsed
Control can be displayed in a window class derived from CWnd
Each member responds to mouse events and provides the user with a programming interface
Second, design and implementation
1. Object
Effects List control (Tasklistbox)--Provides a user programming interface that handles interfacing with a Window object.
Effects List (TaskList)--a delegate to the effects list control that implements all the functionality of the control.
Members (Item)--represents each list member, and can respond to mouse events.
Border (TaskFrame)--handles the title and border drawing of the effects list control.
Collapse button (PUCKERBTN)--implements the collapse action of the effect list control.
2, the object structure as shown in the following figure