Re: Tfont



I like the Idea of string it in the registry, but I have no idea how to do
that, but it sure sounds a great idea. Thank you for your time

"Maarten Wiltink" <maarten@xxxxxxxxxxxxxxxxxx> wrote in message
news:430eca8a$0$11068$e4fe514c@xxxxxxxxxxxxxxxxx
> "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
>
>


.



Relevant Pages

  • Re: Tfont
    ... > is it possible to turn a tFont into a string so I can save what the ... uses a new key for a font and puts name, size, colour, bold, italic, ... single string you could encode it as XML or CSS or any format of your ...
    (alt.comp.lang.borland-delphi)
  • Re: screen.fonts again
    ... As far as I know in a single font file ... Private Declare Function RegCloseKey Lib "advapi32.dll" _ ... ByVal lpSubKey As String, ... Dim Buffer As String, FontName As String ...
    (microsoft.public.vb.general.discussion)
  • Re: Importing Excel files with columns > 255 chars
    ... or similar string manipulation to get the required maximum length. ... to change the column width of Error output columns, ... Create a connection to that spreadsheet and check the data ... the following registry key when reading the spreadsheet: ...
    (microsoft.public.sqlserver.dts)
  • Re: [Q]How to display Tahoma italic font
    ... I can't display Tahoma font in italic properly using ... string and incrementing XIncrement, you should do a second increment as ... character of the non-italic string that follows). ... // beginning at the specified point (XIncrement, YStart). ...
    (microsoft.public.win32.programmer.gdi)
  • Re: CListCtrl unicode doesnt display korean characters correctly
    ... Your assumptions are ok about the not described types, Strings are CString, not arrays of TCHARs ... It is a font from Microsoft. ... The korean string is in case 2. ... The LoadString method gets it from the resources. ...
    (microsoft.public.vc.mfc)