Originally posted by: Michael Scott
I have a problem with the CFont class. I can't set the Terminal font for a Editbox. I need this font because its the only one with oem/dos character set. I hope you can help me
Reply
Originally posted by: cxy
How are you used this API.
Please give me a E-mail.
Originally posted by: fluorite
Thanks Mihai Filimon.
This simple, and funny :) tool makes programmer save time~~
P.S.
I laughed when I saw this article at first
cuz this article was so clever thing. :)
Reply
Originally posted by: plsoft
what is error????? Please reply,Thank you.
void CWordWriterView::OnTest()
How are you used this API.
Please give me a E-mail.
{
// TODO: Add your command handler code here
long yyy=50,hhh=0;
for(WORD ty='A';ty<='Z';ty++){
CClientDC clientdc(this);
CFont fnt,*pfnt;
fnt.CreatePointFont(720,"Arial");
clientdc.TextOut(0,0,_T("Arial"));
pfnt=clientdc.SelectObject(&fnt);
CDC dc;
dc.CreateCompatibleDC(&clientdc);
GLYPHMETRICS gm;
DWORD cbBuffer=NULL;
LPVOID lpBuffer=NULL;
MAT2 mat2;
IdentityMat(&mat2);
cbBuffer=::GetGlyphOutline(clientdc.m_hDC,ty, GGO_BITMAP , &gm, cbBuffer, lpBuffer, &mat2 );
lpBuffer=malloc(cbBuffer);
if(::GetGlyphOutline(clientdc.m_hDC,ty, GGO_BITMAP , &gm, cbBuffer, lpBuffer, &mat2 )!=cbBuffer)
MessageBox("ERROR!");
CBitmap bmp;
bmp.CreateBitmap(gm.gmBlackBoxX,gm.gmBlackBoxY ,1,1,lpBuffer);
dc.SelectObject(bmp);
clientdc.BitBlt( yyy , hhh , gm.gmBlackBoxX, gm.gmBlackBoxY, &dc, 0, 0, SRCCOPY);
clientdc.SelectObject(pfnt);
free(lpBuffer);
if(yyy>600){hhh+=25;yyy=0;}
yyy+=gm.gmBlackBoxX;
if(hhh>480){
Invalidate( TRUE );
yyy=50;hhh=0;
}
}
}
Originally posted by: Steve Hazel
So this stuff assumes an HDC that's going to the screen,
right?
It won't work for printing a certain font's
typeface/pointsize to a printer, right?
Originally posted by: KAA
I'm trying to use a 'Courier' font with a PrintDC. I'm developing in NT, and it works fine on NT, but when I run the same program on 95 It doesn't use the correct font. I've tried this on numerous 95 machines and they all have 'Courier' loaded. Any ideas?
ReplyOriginally posted by: Larry Yates
What we need are MORE tools like this!
This is GREAT STUFF!!!