Re: Tfont
- From: "Maarten Wiltink" <maarten@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 26 Aug 2005 09:53:21 +0200
"anthony" <ajh@xxxxxxxxxxx> wrote in message
news:KbsPe.5888$iM2.579788@xxxxxxxxxxxxxxxxxx
> is it possible to turn a tFont into a string so I can save what the
> font of a certain component is
>
> I am want to store the fonts and background colors, so that when the
> appication restarts it will load the attributes for me.
Where are you storing it? I write things to the Registry; my code
uses a new key for a font and puts name, size, colour, bold, italic,
underline, and strikeout in a value each. If you're bent on having a
single string you could encode it as XML or CSS or any format of your
own devising. (CSS would be rather nice, I think.)
Windows itself saves font information in the Registry as binary dumps
of TLogFontW records. Forty lines of Pascal to decode it or possibly
(I've not tried very hard) a single CreateFontIndirect call.
It's _always_ a good time to be extending your standard library.
Groetjes,
Maarten Wiltink
.
- Follow-Ups:
- Re: Tfont
- From: anthony
- Re: Tfont
- References:
- Tfont
- From: anthony
- Tfont
- Prev by Date: Re: Week Number to Calendar
- Next by Date: using ADO to connect to MS SQL server through a proxy
- Previous by thread: Tfont
- Next by thread: Re: Tfont
- Index(es):
Relevant Pages
|