Print this window

void __fastcall TfrmPrintSearch::btnPrintFontClick(TObject *Sender)
 
{
CHOOSEFONT chooseFnt;
LOGFONT logFnt;

chooseFnt.lStructSize = sizeof(CHOOSEFONT);
chooseFnt.hwndOwner = (HWND)NULL;
chooseFnt.hDC = (HDC)NULL;
chooseFnt.lpLogFont = &logFnt;
chooseFnt.iPointSize = 0;
chooseFnt.Flags = CF_SCREENFONTS;
chooseFnt.rgbColors = RGB(0, 0, 0);
chooseFnt.lCustData = 0L;
chooseFnt.lpfnHook = (LPCFHOOKPROC)NULL;
chooseFnt.lpTemplateName = (LPSTR)NULL;
chooseFnt.hInstance = (HINSTANCE)NULL;
chooseFnt.lpszStyle = (LPSTR)NULL;
chooseFnt.nFontType = SCREEN_FONTTYPE;
chooseFnt.nSizeMin = 0;
chooseFnt.nSizeMax = 0;

// Show the dialog box
if (ChooseFont(&chooseFnt))
{
hFnt = CreateFontIndirect(chooseFnt.lpLogFont); // Create the font from the FontDialog box
SelectObject(printDC, hFnt); // Update the printer with the new font
adjustPaperSize(); // Get the new size of the letter
setXPositions(); // Get the new positions
setPageAmount(); // Update how many pages it will take
} // End the if
}