How do I get the LOGFONT structure from a HFONT handle?
<p>If I have the handle of a window, say <code>hWnd</code>, I can get the handle to its font type, say <code>hFont</code>, like this:</p>

<pre><code>HFONT hFont = SendMessage(hWnd, WM_GETFONT, NULL, NULL);
</code></pre>

<p>After this point, how do I obtain a <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/dd145037(v=vs.85).aspx" rel="nofollow"><code>LOGFONT</code></a> structure (which contains many features of the font), from this <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa383751%28v=vs.85%29.aspx?f=255&amp;MSPPError=-2147217396" rel="nofollow"><code>HFONT</code></a> handle?</p>

<p>My purpose is not to create a font from scratch by calling <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/dd183499(v=vs.85).aspx" rel="nofollow"><code>CreateFont()</code></a>. I want to read font properties into a <code>LOGFONT</code> structure, then arbitrarily modify it, and finally update the font by calling the <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/dd183500(v=vs.85).aspx" rel="nofollow"><code>CreateFontIndirect()</code></a> function and passing the modified <code>LOGFONT</code> object to it.</p>

<p>How do I do this?</p>