打印的奇怪问题, 我在打印时只能把字符打印出来,却不能把图片打印出来,请各位高手帮忙了。
void CMonitorDlg::OnPrint(CDC *pDC, CPrintInfo *pInfo)
{
int logx=pDC->GetDeviceCaps(LOGPIXELSX );
int logy=pDC->GetDeviceCaps(LOGPIXELSY );
//以下打印定制内容
CDC dc;
dc.CreateCompatibleDC(pDC);
CBitmap bmp,*oldbmp;
bmp.LoadBitmap(IDB_SPLASH);
BITMAP bm;
bmp.GetBitmap(&bm);
oldbmp=dc.SelectObject(&bmp);
int width=bm.bmWidth*logx/m_logx;
int height=bm.bmHeight*logy/m_logy;
pDC->StretchBlt(23,150,width,height,&dc,0,0,bm.bmWidth,bm.bmHeight,SRCCOPY);
pDC->TextOut(0,0,"Blue Star 2001-10-16");
dc.SelectObject(oldbmp);
}