String Display in DirectX ProgramsIn DirectX programs, the fg_ddgetdc() and fg_ddfreedc() functions manage device contexts for virtual buffers. You'll need to use these functions if you want to use fg_print() to display strings in a virtual buffer in DirectX applications. To do this, use fg_ddgetdc() to create a device context (DC) for the active virtual buffer. Then pass the DC handle to fg_fontdc(). When done, use fg_ddfreedc() to release the device context. The following code illustrates this sequence:
C/C++:
Delphi:
Visual Basic:
The virtual buffer is automatically locked between the fg_ddgetdc() and fg_ddfreedc() calls.
|
 
copyright 2001 Ted Gruber Software, Inc.