Custom controls-effects list controls

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.