How to make the item or subitem text BOLD or change font in a listview?

Posted on 2005-05-02
Last Modified: 2013-12-03
I want to make the item or subitem text bold or change the font in a listview? How can I do this?
Question by:wzhxxj
    LVL 23

    Accepted Solution

          info.cbSize = sizeof(info);
          SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(info), &info, 0);

          m_pFont = new CFont;
          lstrcpy(info.lfMenuFont.lfFaceName, "Tahoma");
          info.lfMenuFont.lfWeight = FW_BOLD;



          m_wndYourListCtrl.SetFont(m_pFont);  <-- this will change your entire list control to BOLD font...


          use the custom draw listctrl supports subitem color/style change

          Good Luck :)

    LVL 2

    Assisted Solution


    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
    Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now