Board index » cppbuilder » AGAIN - How to set FontNamePropertyDisplayFontNames ($(BCB)\Include\VCL\dsgnintf.hpp)

AGAIN - How to set FontNamePropertyDisplayFontNames ($(BCB)\Include\VCL\dsgnintf.hpp)

How do you set the FontNamePropertyDisplayFontNames ($(BCB)\Include\VCL\dsgnintf.hpp) property to true ??

Maybe someone at Inprise knows...

 

Re:AGAIN - How to set FontNamePropertyDisplayFontNames ($(BCB)\Include\VCL\dsgnintf.hpp)


That must be a new property for BCB5, right?
I don't see it in BCB3 or 4

Gambit

Quote
"J. Wu" <W...@glencorp.f9.co.uk> wrote in message news:391334e1@dnews...
> How do you set the FontNamePropertyDisplayFontNames
> ($(BCB)\Include\VCL\dsgnintf.hpp) property to true ??

Re:AGAIN - How to set FontNamePropertyDisplayFontNames ($(BCB)\Include\VCL\dsgnintf.hpp)


Actually, not a property per se, but a global variable for the IDE to
determine whether fr not actual fonts are used to display the font types
in a TFont property in the IDE, and yes it is new to BCB 5.

Re:AGAIN - How to set FontNamePropertyDisplayFontNames ($(BCB)\Include\VCL\dsgnintf.hpp)


Well, if it's a global variable, can't you just do this?

#include <dsgnintf.hpp>

FontNamePropertyDisplayFontNames = true;

Gambit

Quote
"J.Wu" <W...@glencorp.f9.co.uk> wrote in message news:3913e167@dnews...

> Actually, not a property per se, but a global variable for the IDE

<snip>

Re:AGAIN - How to set FontNamePropertyDisplayFontNames ($(BCB)\Include\VCL\dsgnintf.hpp)


You need to create a Open Tool API wizard / expert that loads with the
IDE and sets this. For more information on the OTA look in

borland.public.delphi.opentoolapi
Or purchase Ray Lischner's book "Hidden Paths of Delphi 3"

If you look in Code Central you will find various experts / wizard that
will give you a head start. But I have read an article either on the
community site (from the point of view of Delphi) or in the Delphi
Informant magazine (www.delphizine.com) where some one (it could have
been Ray Lischner but I'm not sure) shows you exactly how to do just
this.

Regards
David Hoyle :-)

Today I have been mostly listening to
Software Machine - Alive and Well - Recorded in Paris

E-Mail (Home)   : da...@hoyld.freeserve.co.uk
E-Mail (Work)   : david.ho...@olealliance.co.uk
Web Site Address: http://www.hoyld.freeserve.co.uk/

Re:AGAIN - How to set FontNamePropertyDisplayFontNames ($(BCB)\Include\VCL\dsgnintf.hpp)


Hi David,

Thanks for this... I will post if I make any progress. At least I know where to start!

Re:AGAIN - How to set FontNamePropertyDisplayFontNames ($(BCB)\Include\VCL\dsgnintf.hpp)


Now this was bugging me so here is a Delphi 3.0 style Open Tools API.
Unfortunately my C++ isn't up to the conversion yet, may be some other
night.

This consists of two files that need to be included and compiled into a
package. BCB 5 should handle this Delphi code... hold on I'll check...
sorry doesn't compile - can't find dsgnintf.dcu but then again my BCB5
Pro
is a compact installation (need a big shiny new machine...) ...here the
code anyway.

***********************************************
Unit DGHFontThingReg;

Interface

Uses
  Exptintf, DGHFontThing;

  Procedure Register;

Implementation

{ Register this expert as part of the component library }

Procedure Register;

Begin
  RegisterLibraryExpert(TDGHFontThing.Create);
End;

End.
*************************************************************

*************************************************************
Unit DGHFontThing;

Interface

Uses
  Windows, Dialogs, ExptIntf, EditIntf, Classes, ToolIntf, IStreams;

Type
  TDGHFontThing = Class(TIExpert)
  Public
    Constructor Create;
    Destructor Destroy; Override;
    Procedure Execute; Override;
    Function GetAuthor : String; Override;
    Function GetComment : String; Override;
    Function GetGlyph : HICON; Override;
    Function GetIDString : String; Override;
    Function GetMenuText : String; Override;
    Function GetName : String; Override;
    Function GetPage : String; Override;
    Function GetState : TExpertState; Override;
    Function GetStyle : TExpertStyle; Override;
  End;

Implementation

Uses
  SysUtils, DsgnIntf;

{ TDGHFontThing Class Methods }

Constructor TDGHFontThing.Create;

Begin
  Inherited Create;
  { Your Code Goes Here... }
  FontNamePropertyDisplayFontNames := True;
End;

Destructor TDGHFontThing.Destroy;

Begin
  FontNamePropertyDisplayFontNames := False;
  { Your Code Goes Here... }
  Inherited Destroy;
End;

Procedure TDGHFontThing.Execute;

Begin
  { Your execution code goes here... }
End;

Function TDGHFontThing.GetAuthor : String;

Begin
  Result := '';
End;

Function TDGHFontThing.GetComment : String;

Begin
  Result := '';
End;

Function TDGHFontThing.GetGlyph : HICON;

Begin
  Result := 0;
End;

Function TDGHFontThing.GetIDString : String;

Begin
  Result := '.DGHFontThing';
End;

Function TDGHFontThing.GetMenuText : String;

Begin
  Result := '';
End;

Function TDGHFontThing.GetName : String;

Begin
  Result := 'DGHFontThing';
End;

Function TDGHFontThing.GetPage : String;

Begin
  Result := '';
End;

Function TDGHFontThing.GetState: TExpertState;

Begin
  Result := [];
End;

Function TDGHFontThing.GetStyle: TExpertStyle;

Begin
  Result := esAddin;
End;

End.
*************************************************************

Have fun, if you want to generate the template for the OTA look at my
web site (shameless plug) for the New Expert Wizard under the useful
code section.

Regards
David Hoyle :-)

Today I have been mostly listening to
Stone Template Pilots - Tiny Music

E-Mail (Home)    : da...@hoyld.freeserve.co.uk
E-Mail (Work)    : david.ho...@olealliance.co.uk
Web Site Address : http://www.hoyld.freeserve.co.uk/

Re:AGAIN - How to set FontNamePropertyDisplayFontNames ($(BCB)\Include\VCL\dsgnintf.hpp)


Hi David,
Thanks again, I will try this code, or a C++ version of it and let you know how I do.
dsgnintf.dcu no longer ships with Builder, thats why you can't find it, something about
copyright I believe. Hopefully with the examples that come with Builder and this I can
do something useful :-)

Jamie

Re:AGAIN - How to set FontNamePropertyDisplayFontNames ($(BCB)\Include\VCL\dsgnintf.hpp)


There may be another (undocumented) way of doing this. There is
an article under Delphi | Tools | IDE about undocumented IDE
extras. If you look at the thread view there is a posting where
someone has noted that FontNamePropertyDisplayFontNames can be
enabled for Delphi from there. It may work for C++ Builder. I
can't try it at the moment so I can not confirm it works.

Regards
David Hoyle :-)

West Coast Route Modernisation
OLE & Distribution Alliance
Planning Engineer

Telephone:              (01788) 557 036 (Ex 136)
Fax:                    (01788) 557 395
E-mail(Work):   david.ho...@olealliance.co.uk
E-mail(Home):   da...@hoyld.freeserve.co.uk
Web Site:               http://www.hoyld.freeserve.co.uk/

"When I get a little money I buy books;
and if any is left I buy food and clothes."
- Erasmus

Other Threads