How to deal with a IFontDisp ?

Hi,
  I'm programming to Crystal with MFC. There is a function GetFont() returning IFontDisp. But if I write:
    IFontDisp fd1 = GetFont();
  compile errors raise and say:"cannot instantiate abstract class".
  Then how can I get the font information from this function?
LewisFoxAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
migelConnect With a Mentor Commented:
Hi!
may be ?
   IFontDisp* fd1 = GetFont();
0
 
LewisFoxAuthor Commented:
Yes!
IFontDisp *fd1 = (IFontDisp *)GetFont();
Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.