Hi
Can anyone help me to get the Font-Size of the desktop window?
Thanks a lot
Rene“
Printable View
Hi
Can anyone help me to get the Font-Size of the desktop window?
Thanks a lot
Rene“
You can use
ZeroMemory((PVOID)&m_lf, sizeof(LOGFONT));
NONCLIENTMETRICS nm;
nm.cbSize = sizeof(NONCLIENTMETRICS);
// Get the system metrics for the Caption from here
VERIFY (SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &nm, 0));
to get the LOGFONT structure for Menu, StatusBars, and MessageBoxes.
On the other hand, you can use
CFont *pFont = GetDesktopWindow()->GetFont();
if (pFont)
{
LOGFONT logFont;
pFont->GetLogFont(&logFont);
}
All the information is in the LOGFONT structure.