开发者

Creating a control like this

开发者 https://www.devze.com 2023-01-04 21:19 出处:网络
How could I create a control that looks like this one: http://img195.imageshack.us/img195/4268/eeeea开发者_高级运维e.png http://img195.imageshack.us/img195/4268/eeeeae.png

How could I create a control that looks like this one:

http://img195.imageshack.us/img195/4268/eeeea开发者_高级运维e.png http://img195.imageshack.us/img195/4268/eeeeae.png

I just want that small end. Thanks


If that's a Windows ComboBox control with a visual style applied to it, you can render its themed button wherever you like using DrawThemeBackground() and CP_DROPDOWNBUTTON.


In your WndProc handle the WM_PAINT message. The easiest way using GDI is to have a ready to use image in your resources to load and drow on the window's DC. Little bit more complicated is to use GDI+, where you can draw rounded corners using Path object and gradient background using LinearGradientBrush.

0

精彩评论

暂无评论...
验证码 换一张
取 消