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. Possible to use CFontDialog in PropertySheet?

Possible to use CFontDialog in PropertySheet?

Scheduled Pinned Locked Moved C / C++ / MFC
c++question
4 Posts 4 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.
  • M Offline
    M Offline
    michael thomas
    wrote on last edited by
    #1

    Hi, Thank you for dropping by. I want to display a dialog box to the user so that they can choose a font. Now CFontDialog does this very nicely. However, all my programs options are in "tabbed Property sheets" so that the user can find all the config stuff in one place. What I would like to do is to add the CFontDialog as a Property Page to the Property Sheet along with all the other config dialogs. Is this possible? Thank you. P.S. I am using VC++ v6 Michael Thomas

    V R J 3 Replies Last reply
    0
    • M michael thomas

      Hi, Thank you for dropping by. I want to display a dialog box to the user so that they can choose a font. Now CFontDialog does this very nicely. However, all my programs options are in "tabbed Property sheets" so that the user can find all the config stuff in one place. What I would like to do is to add the CFontDialog as a Property Page to the Property Sheet along with all the other config dialogs. Is this possible? Thank you. P.S. I am using VC++ v6 Michael Thomas

      V Offline
      V Offline
      valikac
      wrote on last edited by
      #2

      Consider adding the font dialog to the property sheet as though it is a property page. If that does not work, then derive a class from CFontDialog and CPropertyPage. Kuphryn

      1 Reply Last reply
      0
      • M michael thomas

        Hi, Thank you for dropping by. I want to display a dialog box to the user so that they can choose a font. Now CFontDialog does this very nicely. However, all my programs options are in "tabbed Property sheets" so that the user can find all the config stuff in one place. What I would like to do is to add the CFontDialog as a Property Page to the Property Sheet along with all the other config dialogs. Is this possible? Thank you. P.S. I am using VC++ v6 Michael Thomas

        R Offline
        R Offline
        ROK_RShadow
        wrote on last edited by
        #3

        Instead of using Multiple Inheritance and deriving your class from CPropertyPage and CFontDialog you should be able to create a dialog template and include the CFontDialog inside of it, much the same way as you can with CFileDialog. I don't have the method to do this handy right now, but it involves creating a dialog template, and including a static or group box with a special id stc=0x30 or something like that. There are several examples on the net. That should work, allthough I have not tried it yet.

        1 Reply Last reply
        0
        • M michael thomas

          Hi, Thank you for dropping by. I want to display a dialog box to the user so that they can choose a font. Now CFontDialog does this very nicely. However, all my programs options are in "tabbed Property sheets" so that the user can find all the config stuff in one place. What I would like to do is to add the CFontDialog as a Property Page to the Property Sheet along with all the other config dialogs. Is this possible? Thank you. P.S. I am using VC++ v6 Michael Thomas

          J Offline
          J Offline
          Joan M
          wrote on last edited by
          #4

          Take a look at "advanced programming with Microsoft Visual C++" from microsoft press, at it's chapter 7 it explains nicely/easily how to insert common dialogs inside a normal one. If you want you can insert a common dialog into a property page (in the same way). If you don't have the book, send me a mail so I can send you the code that's inside the CDROM that came with the book. Regards.

          https://www.robotecnik.com freelance robots, PLC and CNC programmer.

          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