Windows API中PUSHBUTTON控件的文本颜色 [英] Text Color of a PUSHBUTTON Control in Windows API

查看:59
本文介绍了Windows API中PUSHBUTTON控件的文本颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何更改按钮按钮的文本颜色????使用Windows API.

How do i change the text color of a PUSHBUTTON...??? Using Windows API.

推荐答案

阅读Microsoft文档:

http://msdn.microsoft.com/zh-CN /library/windows/desktop/bb761849(v=vs.85).aspx [
Read Microsoft documentation:

http://msdn.microsoft.com/en-us/library/windows/desktop/bb761849(v=vs.85).aspx[^]

By the way, this kind of thing is somehow hard to do with the API (and just a bit better with MFC) as message are sent to the parent windows instead of the control itself. This make it harder to make reusable controls.

WinForms (and WPF) are hundredth of time better for that. The color can be set directly in the designer or a single line of code is required to set the color in code.


您需要对控件进行子类化.请阅读创建自己的控件-子类化的艺术 [ ^ ]
You need to subclass controls. Please read Create your own controls - the art of subclassing[^]


这篇关于Windows API中PUSHBUTTON控件的文本颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆