|
-
April 22nd, 1999, 06:56 AM
#1
Help: getting Font-Size of desktop window
Hi
Can anyone help me to get the Font-Size of the desktop window?
Thanks a lot
Rene´
-
April 22nd, 1999, 09:24 AM
#2
Re: Help: getting Font-Size of desktop window
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|