Menu Close

When invoking TextOut from the OnFrameBitmap event, how to change the font size?

How Can We Help?

< Back
You are here:
Print

When invoking TextOut from the OnFrameBitmap event, how to change the font size?

Create a font and select it in the DC before calling TextOut, e.g.:


static void CALLBACK OnFrameBitmap(void *Object, void *Sender, TFrameInfo *FrameInfo, TFrameBitmapInfo *BitmapInfo)
{
HFONT hFont=CreateFont(80,0,0,0,FW_BOLD,0,0,0,0,0,0,2,0,”SYSTEM_FIXED_FONT”);
HFONT hPreviousFont = (HFONT)SelectObject(BitmapInfo->bitmapDC, hFont);
TextOut( BitmapInfo->bitmapDC,10,10,L”the text overlay”, 16);
SelectObject (BitmapInfo->bitmapDC, hPreviousFont);
DeleteObject (hFont);

}

Table of Contents