[Untitled] CTreeCtrl changes -/+ expand button color

This is a C++ header file that defines a self-drawn CTreeCtrl class named CSWTreeCtrl. This class inherits from CTreeCtrl and adds some extra functionality.

This class has the following member variables and functions:

Member variables:

m_nFirstColumnWidth: width of the first column
m_nOffsetX: X offset relative to the parent form
m_bkImage: background image information
m_imgBtns: image list of +/- icon symbols expanded by the number control
Member function:

CommonConstruct(): Initialization function
CheckHit(): Check whether the point is on the tree control
CustomDrawNotify(): Custom drawing notification function
OwnerDrawBackground(): Drawing background function
GetBkImage(): Get background image information
SetBkImage(): Set background image information
SetTreeBtnBitmap (): Set the +/- button icon for the expanded tree control.
This class also overloads some message functions, such as OnKeyDown, OnMouseMove, OnLButtonDown, etc., for processing keyboard and mouse messages and drawing events.

Generally speaking, this class is a self-drawn tree control that can support functions such as background image display and custom drawing of button icons.

#pragma once

おすすめ

転載: blog.csdn.net/vv1025/article/details/132873619