简体   繁体   English

获取标题栏文本大小WINAPI

[英]Get titlebar text size WINAPI

How to get the (text size or height) of the titlebar. 如何获取标题栏的(文本大小或高度)。
I tried to use GetSystemMetrics(SM_CYCAPTION) but it returns the height of the titlebar not the text size. 我尝试使用GetSystemMetrics(SM_CYCAPTION)但它返回标题栏的高度而不是文本大小。
Any suggestions? 有什么建议么?

Call SystemParametersInfo passing SPI_GETNONCLIENTMETRICS . 通过SPI_GETNONCLIENTMETRICS调用SystemParametersInfo This will populate a NONCLIENTMETRICS structure. 这将填充一个NONCLIENTMETRICS结构。 Within that structure is lfCaptionFont which contains the information you desire. 在该结构中是lfCaptionFont ,其中包含您所需的信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM