获取复选框的大小 [英] Get the size of checkbox
问题描述
我使用自定义绘制来更改主题复选框的文本和背景颜色。
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屋!