Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 691
  • Last Modified:

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

I want to make the item or subitem text bold or change the font in a listview? How can I do this?
0
wzhxxj
Asked:
wzhxxj
2 Solutions
 
Roshan DavisCommented:
     NONCLIENTMETRICS info;
      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_pFont->CreateFontIndirect(&info.lfMenuFont);


      ----------------------


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



      OR

      use the custom draw listctrl supports subitem color/style change
      http://www.codetools.com/listctrl/xlistctrl.asp

      Good Luck :)

~roshan
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now