visual-c++ - 如何为我的 MFC colorbutton 控件设置默认颜色?
问题描述
我想将粉红色作为默认颜色添加到我的 MFC 颜色按钮而不是黑色。
void TabOne::OnBnClickedColor()
{
// TODO: Add your control notification handler code here
CMFCColorButton* thisbutton = (CMFCColorButton*)GetDlgItem(Color);
COLORREF ref = RGB(255, 0, 255);
thisbutton->SetColor(ref);
thisbutton->UpdateWindow();
}
它不会改变颜色。
解决方案
推荐阅读
- html - 制作框阴影并使文本更接近文本
- chart.js - 如何将数据集添加到 chart.js 中的堆积条形图
- java - paintComponent 执行了两次,绘制失败
- node.js - 使用 nodejs 中的 async.js 模块为数组的每个元素处理异步
- string - 常量块中的原始字符串文字
- css - 如何合并不在 Google Material for Angular 中的图标?
- amazon-web-services - 无服务器框架 AWS 跨账户自定义授权方
- android - Google Play Install Referrer 在某些响应中缺少活动 ID
- java - 如何从 JavaFX 中的 Java 控制器控制 CSS 文件
- local-storage - 电子将旧应用程序的本地存储迁移到新应用程序