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

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.

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.


  • Create New...