CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 1999
    Posts
    3

    How to set any font directories to CFontDialog

    I want to create a specific Font dialog box which can select the font from any directory ( not windows\font ).

    thank's


  2. #2
    Join Date
    May 1999
    Location
    Farnborough, Hants, England
    Posts
    710

    Re: How to set any font directories to CFontDialog

    Why would the fonts be anywhere other than WINDOWS/FONTS?

    --
    Jason Teagle
    [email protected]

  3. #3
    Join Date
    Jun 1999
    Posts
    3

    Re: How to set any font directories to CFontDialog

    Because my application Have to select few fonts which are installed in a specific directory


  4. #4
    Join Date
    May 1999
    Location
    Farnborough, Hants, England
    Posts
    710

    Re: How to set any font directories to CFontDialog

    I did a little experimenting with CFontDialog, and I'm afraid the answer is grim. Because CFontDialog uses the underlying API to show the font dialog, everything is buried deep in the API. There is no handy way to redirect it. It most likely uses the EnumFontFamilies() API call which does all the hard work. You might be able to install your own hook, but it doesn't seem worth it as you are still going to have to get details of the fonts in your own directory by hand - if that is even possible. You might just as well create your own dialogue box for the purpose. Sorry that wasn't what you wanted to hear.

    You might be able to cheat by copying the fonts from the user directory into the WINDOWS/FONTS directory so that they APPEAR to be part fo the font list - you can always make a note of which files you copied over and remove them again later.



    --
    Jason Teagle
    [email protected]

  5. #5
    Join Date
    Jun 1999
    Posts
    3

    Re: How to set any font directories to CFontDialog

    Thank you for your response.
    D.Harroch


Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured