简体   繁体   中英

c++ win32 change trackbar background color

I have a win32 API, developed in c++ and i can't find any useful information regarding how can i change the background color of a Trackbar component in windows Vista and above?

I am looking for a equivalent to .NET attribute called BackColor.

Winforms implements it by handling WM_CTLCOLORSTATIC for a TrackBar control. The example code in the linked SDK article should do the trick.

之前没有做过,但是请尝试使用NM_CUSTOMDRAW作为轨迹栏 ,然后在绘制控件时(可能在CDRF_NOTIFYPOSTERASE阶段)为该控件设置背景画笔和DC的文本颜色。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM