Главная страница | назад





Article #17578: Getting the system Menu Font

 Question and Answer Database
FAQ2578C.txt Getting the system Menu Font
Category :Windows API
Platform :All
Product :C++Builder 3.x
Question:
How do I get the currently selected menu font?
Answer:
This bit of code will do it:
//---------------------------------------------------
NONCLIENTMETRICS theMetrics;
AnsiString menuFontFaceName;
theMetrics.cbSize = sizeof(NONCLIENTMETRICS);
SystemParametersInfo(SPI_GETNONCLIENTMETRICS,sizeof(NONCLIENTMETRICS),
(PVOID) theMetrics,0);
menuFontFaceName = theMetrics.lfMenuFont.lfFaceName;
//---------------------------------------------------
7/2/98 10:32:32 AM

Last Modified: 01-SEP-99