Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Setting font on a CFileDialog

Setting font on a CFileDialog

Scheduled Pinned Locked Moved C / C++ / MFC
questionhardwarelearning
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gh
    wrote on last edited by
    #1

    Hi, I'm trying to figure out a way to change the font used within the list control that is embedded inside the CFileDialog. As I understand it, it's resource id is "lst1", but how can I set the font used to display the files, let's say, in my override "OnInitDialog"? (I'm inheriting from CFileDialog). Thanks in advance.

    G M 2 Replies Last reply
    0
    • G gh

      Hi, I'm trying to figure out a way to change the font used within the list control that is embedded inside the CFileDialog. As I understand it, it's resource id is "lst1", but how can I set the font used to display the files, let's say, in my override "OnInitDialog"? (I'm inheriting from CFileDialog). Thanks in advance.

      G Offline
      G Offline
      gh
      wrote on last edited by
      #2

      Anyone?

      1 Reply Last reply
      0
      • G gh

        Hi, I'm trying to figure out a way to change the font used within the list control that is embedded inside the CFileDialog. As I understand it, it's resource id is "lst1", but how can I set the font used to display the files, let's say, in my override "OnInitDialog"? (I'm inheriting from CFileDialog). Thanks in advance.

        M Offline
        M Offline
        Matt Gullett
        wrote on last edited by
        #3

        You should be able to CWnd* pWnd = GetDlgItem(); ASSERT(pWnd); pWnd->SetFont();

        G 1 Reply Last reply
        0
        • M Matt Gullett

          You should be able to CWnd* pWnd = GetDlgItem(); ASSERT(pWnd); pWnd->SetFont();

          G Offline
          G Offline
          gh
          wrote on last edited by
          #4

          This true for all the cases where I've wanted to change the font on a particular control, but it does NOT work when you attempt it on a file dialog for some reason. I'm truly stumped. Thanks for your reply, though.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups