HDC hdcScreen; CDC * dcWindow; dcWindow = this->GetDC(); CClientDC dc7(this); CDC memDC; //memDC.CreateCompatibleDC(&dc7); memDC.CreateCompatibleDC(dcWindow); memDC.SetMapMode(MM_ANISOTROPIC); memDC.SetViewportExt(2,2); memDC.SetWindowExt(3,3); CPreview p; p.m_Bmp.DeleteObject(); p.m_Bmp.CreateCompatibleBitmap(&memDC,m_lWidth*2/3,m_iHight*2/3); BITMAP bmpinfo; p.m_Bmp.GetBitmap(&bmpinfo); int xb=bmpinfo.bmWidthBytes; byte *buffer=new byte[xb*m_iHight]; p.m_Bmp.GetBitmapBits(xb*m_iHight,buffer); for (long i=0;i<xb*m_iHight;i++) buffer[i]=0xff; p.m_Bmp.SetBitmapBits(xb*m_iHight,buffer); CBitmap* d=memDC.SelectObject(&p.m_Bmp);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)