Jump to content
Software FX Community

Re: Question about manipulating Annotation Objects


User (Legacy)
 Share

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...