Jump to content
Software FX Community

Re: Question about manipulating Annotation Objects

User (Legacy)

Recommended Posts

ok....sorry about this, but I am still confused...B)

I am creating a new CFontHolder, and changing some of its attributes.

I then add its IFontDisp to the label and tell the label to print at the

origin of my graph. But nothing is printing on my screen. I know I have to

be missing something, I just can't figure it out.

Here is the code that i am using:

CFontHolder *font_holder;

font_holder = new CFontHolder(NULL);


size.Hi = 12;

size.Lo = 0;

label = m_pAnnList->Add((short)OBJECT_TYPE_TEXT);


hr = label->putref_Font(font_holder->GetFontDispatch());

label->BkColor = RGB(255,0,0);

label->Text = "My Label";

label->Top = 0;

label->Left = 0;

label->Width = 500;

label->Height = 100;



label->Attach(ATTACH_NONE, NULL);


Francisco Padron <frankp@softwarefx.com> wrote in message


> Hi,


> Yes, you need to do a QueryInterface and get the IFont. You can then use


> IFont methods to change things. If you are using MFC, there is a helper

> class called CFontHolder that makes it easier.


> Frank



Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...