简体   繁体   中英

How to draw a button using winAPI

I have successfully created an owner drawn button.

But how do I now draw/color the darn thing, to make it look like a Button using the Windows API? Currently, it just looks like a colored label?

Any C examples?

Sounds like you're looking for DrawFrameControl . For the cool, Vista/7-looking controls, look at uxtheme.dll .

For the modern-looking buttons, just copy/paste this into your source:

#pragma comment(linker,"\"/manifestdependency:type='win32' \
name='Microsoft.Windows.Common-Controls' version='6.0.0.0' \
processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")

Well, unless you want to memorize it...

可能这会有所帮助: 一个 2

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