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);

font_holder->InitializeFont(NULL);

size.Hi = 12;

size.Lo = 0;

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

font_holder->m_pFont->put_Size(size);

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;

Thanks,

Lisa

label->Attach(ATTACH_NONE, NULL);

label->Refresh(FALSE);

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

news:DE0379D14694D211B4CE00609770710D03D29F@sftfx-221.wamnet.net...

> Hi,

>

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

the

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

> class called CFontHolder that makes it easier.

>

> Frank

> SFX

>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...