ChrisTheAvatar
asked on
DirectX7 (DirectDraw) and C#
Good evening,
I am having problems with setting fonts using DirectX7, mainly dealing with the directdrawsurface7.setfont () function. everything else seems to be working wonderfully.
The acctual problem is the setfont function wants me to pass a IFont type (Interface) object, and I cannot create a instance nor can I inherit the Interface by another class. Is there any work around API I can possibly call or is there anyway to create a IFont Type.
Thanks for your help
Chris The Avatar
I am having problems with setting fonts using DirectX7, mainly dealing with the directdrawsurface7.setfont
The acctual problem is the setfont function wants me to pass a IFont type (Interface) object, and I cannot create a instance nor can I inherit the Interface by another class. Is there any work around API I can possibly call or is there anyway to create a IFont Type.
Thanks for your help
Chris The Avatar
Dim myFont As DxVBLib.IFont
Get the hFont (handle to font) information and pass it by reference (which in turn becomes an IFont).
You should be able to create a handle for a font and set the properties.
This should work with C#.
DC
You should be able to create a handle for a font and set the properties.
This should work with C#.
DC
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
A C-- Why did I only get a C grade? Isn't C sorta like failing on this site...?
The IFont class is used by the DirectDrawSurface7.SetFont
For information on this class and its associated methods, see the Font class documentation in Visual Basic.
My guess from this, dim an "IFont" object. If that doesn't work, dim a "Font" object.