TEXTMETRIC tm;
int y = 0;
CFont fntZdy, *pfntOld;
pfntOld =(CFont *)pDC->SelectStockObject(DEVICE_DEFAULT_FONT);
pDC->TextOut(10,y,"Hello! This is Device Default Font.");
pDC->GetTextMetrics(&tm);
y = y + tm.tmHeight + tm.tmExternalLeading;
fntZdy.CreatePointFont(200,"Time New Roman",pDC);
pfntOld = pDC->SelectObject(&fntZdy);
pDC->SetTextColor(RGB(0,0,255));
pDC->TextOut(10,y,"Hello!This is 20 Pt Time New Romn Font");
int y = 0;
CFont fntZdy, *pfntOld;
pfntOld =(CFont *)pDC->SelectStockObject(DEVICE_DEFAULT_FONT);
pDC->TextOut(10,y,"Hello! This is Device Default Font.");
pDC->GetTextMetrics(&tm);
y = y + tm.tmHeight + tm.tmExternalLeading;
fntZdy.CreatePointFont(200,"Time New Roman",pDC);
pfntOld = pDC->SelectObject(&fntZdy);
pDC->SetTextColor(RGB(0,0,255));
pDC->TextOut(10,y,"Hello!This is 20 Pt Time New Romn Font");