Announcement

Collapse
No announcement yet.

Font in a resource file

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Font in a resource file

    Greetings

    I want to use a special font (only for this one app) and I would like to use it from a resource file (.pbr). There was a discussion about this five years ago, which didn't really resolve much. I'm hoping someone has worked on this since. Obviously, a code example would be appreciated. I'm using PBWin 9
    Thanks much

    Mike


    PS I read somewhere that there is a free upgrade from PB/Forms 1.50 to 1.51 but I couldn't find it anywhere. Please advise.
    "Self-education is, I firmly believe, the only kind of education there is" - Isaac Asimov

  • #2
    There was a discussion about this five years ago, which didn't really resolve much.
    Oh, it sure DID..

    http://www.powerbasic.com/support/pb...ad.php?t=22327

    Oh, you wanted to do this without the need to ship an external file?

    Code:
    //  myprog.rc 
    101   MYFONT     "font_file_name" 
    ...
    User-Defined Resource Demo January 26 2003
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      (It ran 'as is' this AM using Pb Win 9.0.0)

      You know, "someone" should really clean up that demo and post it in the source code forum with a more searchable title..... with the code required to store the font file in a program resource, too.

      How about YOU? It would be a very nice "first contribution".
      Michael Mattias
      Tal Systems (retired)
      Port Washington WI USA
      [email protected]
      http://www.talsystems.com

      Comment


      • #4
        Re the comment about the one file not loading from the program resource...

        There is a bug in PBRES 1.86 (what shipped with 7x, 8x and 9x) which may be affecting this. Try it with PBRES 1.61

        If you don't have that version of PBRES.EXE, ask support for a copy. I know they have it because they used it to confirm my bug report about 10 days ago.

        MCM
        Michael Mattias
        Tal Systems (retired)
        Port Washington WI USA
        [email protected]
        http://www.talsystems.com

        Comment


        • #5
          Many thanks, Michael. I haven't got it working yet, but at least the resource file now compiles without complaint. Once everything is a go, I will indeed comply with your suggestion to contribute.

          Also, thanks to Jeff Daniels for the whereabouts of PB/Forms 1.51

          Regards,

          Mike
          "Self-education is, I firmly believe, the only kind of education there is" - Isaac Asimov

          Comment

          Working...
          X