locked
How do i get the current app's font information RRS feed

  • Question

  • Hi, how can i get the current used font information in app? I try to use GetDC and GetTextMetrics to get the information. However, it seems hard to get the realtime font information. For example, now we open Notepad.exe. The default notepad font size is 12. We change the font size from 12 to 48. How can i get this information? Thanks for your replying in advance.
    Friday, October 20, 2006 1:49 AM

Answers

  • You cannot retrieve the font from the device context.  It is determined programmatically in the application's paint event.
    Friday, October 20, 2006 7:36 PM

All replies

  • You can always use


    this.Font
     
    to retrieve the font information.

     

    Friday, October 20, 2006 2:04 AM
  • You cannot retrieve the font from the device context.  It is determined programmatically in the application's paint event.
    Friday, October 20, 2006 7:36 PM