I don't think that will work as the edit control uses a common (shared) device context. GetDC documentation says:
For class and private DCs, GetDC leaves the previously assigned attributes unchanged. However, for common DCs, GetDC assigns default attributes to the DC each time it is retrieved. For example, the default font is System, which is a bitmap font. Because of this, the handle for a common DC returned by GetDC does not tell you what font, color, or brush was used when the window was drawn.
I learnt this the hard way when coding this.

Another approach that may work would be:
- Call WM_GETFONT to get a font handle.
- If that returns NULL, call GetStockObject with SYSTEM_FONT to get a font handle.
- Call GetObject to get the LOGFONT data for the font, which includes the font name.