获取复选框的大小 [英] Get the size of checkbox

查看:219
本文介绍了获取复选框的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用自定义绘制来更改主题复选框的文本和背景颜色。

I am using a custom draw to change the text and background color of a themed checkbox.

为了正确定位文本,需要复选框的尺寸。下图显示了我的意思:

In order to position text properly I need the dimensions of the check box. The below picture illustrates what I mean:

通过StackOverflow存档浏览这篇文章,但它让我困惑。我只是不知道哪个答案是我的问题的解决方案。互联网没有帮助。

Browsing through StackOverflow archive I found this post but it got me confused. I just do not know which answer is the solution to my problem. Internet did not help either.

推荐答案

你需要的功能,我理解是 GetThemePartSize 。您需要为该部件提供 BP_CHECKBOX ,以及是适当的。

The function that you need, as I understand it is GetThemePartSize. You need to supply BP_CHECKBOX for the part, and whichever of the states is appropriate.

这篇关于获取复选框的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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