+ Reply to Thread
Results 1 to 2 of 2

Thread: How to get font of status bar used in Windows?

  1. #1

    How to get font of status bar used in Windows?

    I want to get the font name and its height and other values of Window's status bar.

    This status bar is used in many of the windows application.

    I want to customize it.

    how can I get this information in MFC/WIN32?

  2. #2
    Junior Member
    Join Date
    Apr 2012
    Posts
    46
    You can use SystemParametersInfo API with SPI_GETNONCLIENTMETRICS option to get/set this information.

    Example:

    Code:
    void GetStatusBarFont()
    {
    	NONCLIENTMETRICS objNonClientMetrics ;
    	memset(&objNonClientMetrics, 0, sizeof(objNonClientMetrics)) ;
    	objNonClientMetrics.cbSize = sizeof(objNonClientMetrics) ;
    
    	BOOL bSuccess = SystemParametersInfo(SPI_GETNONCLIENTMETRICS, objNonClientMetrics.cbSize, &objNonClientMetrics, 0) ;
    
    	//objNonClientMetrics.lfStatusFont is what you are looking for.
    }

+ Reply to Thread

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts