打印机没反应
谢谢!/////////////
CDC mDC;
CBitmap OldBit;
BITMAP bm;
CBitmap CurBit;
CurBit.LoadBitmap(IDB_RED_LAMP);
CurBit.GetObject(sizeof BITMAP,&bm);
//pDC->Attach(dlg.GetPrinterDC());//°Ñ´òÓ¡É豸»·¾³¸½¼Óµ½DC¶ÔÏó
mDC.CreateCompatibleDC(pDC);
OldBit.Attach(mDC.SelectObject(&(CurBit)));CBitmap *OldBmp = pDC->SelectObject(&(CurBit));
pDC->SetBkMode(TRANSPARENT);
pDC->SelectStockObject(NULL_BRUSH);
int width = pDC->GetDeviceCaps(HORZRES);
int height = pDC->GetDeviceCaps(VERTRES); int w = bm.bmWidth;
int h = bm.bmHeight; int xx = (width - w ) /2;
int yy = (height - h ) /2;pDC->BitBlt(xx,yy,bm.bmWidth,bm.bmHeight ,&mDC,0,0,SRCCOPY);
mDC.SelectObject(&OldBit);
pDC->SelectObject(OldBmp);