獲取Win32 API中菜單項的字體大小?

[英]Getting the font size of a Menu Item in the Win32 API?


Is it possible to retrieve the size of the font used in a menu via the Win32 API? I have found the GetTextMetrics() call, but cannot find a way to specify it getting the font used in a menu. Any suggestions?

是否可以通過Win32 API檢索菜單中使用的字體大小?我找到了GetTextMetrics()調用,但無法找到指定它獲取菜單中使用的字體的方法。有什么建議?

1 个解决方案

#1


It looks like you can use this call

看起來你可以使用這個電話

SystemParametersInfo(SPI_GETNONCLIENTMETRICS)

to get various system parameters. The resulting structure contains a LOGFONT item for the menu font and you should be able to determine the fontsize from that.

獲得各種系統參數。生成的結構包含菜單字體的LOGFONT項,您應該能夠從中確定fontsize。


注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2009/02/14/725c7556fafc30b006d3408bd814b754.html



 
粤ICP备14056181号  © 2014-2021 ITdaan.com