HDC CSTScreenBuffer::GetDC() { if (m_pDC) return m_pDC; m_pDC = CreateCompatibleDC(NULL); if (!m_pDC) { return NULL; } m_hSaveBitmap = (HBITMAP)SelectObject(m_pDC,GetHBitmap()); return m_pDC; }
void WINAPI GenerateBMPW(LPWSTR fileName, LPWSTR text, int margin, int size) { if (fileName == NULL) return; HBITMAP bmp = GetHBitmap(text, margin, size); if (bmp == NULL) return; PBITMAPINFO info = CreateBitmapInfoStruct(bmp); if (info != NULL) { HDC hdc = GetDC(0); CreateBMPFile(fileName, info, bmp, hdc); ReleaseDC(0, hdc); DeleteObject(bmp); LocalFree(info); } }
void VPictureData_GDIBitmap::DrawInGDIPlusGraphics(Gdiplus::Graphics* inDC,const VRect& r,VPictureDrawSettings* inSet)const { xDraw(GetHBitmap(),inDC,r,inSet); }
void VPictureData_GDIBitmap::DrawInD2DGraphicContext(VWinD2DGraphicContext* inDC,const VRect& r,VPictureDrawSettings* inSet)const { Gdiplus::Bitmap bm(GetHBitmap(),0); xDraw(&bm,inDC,r,inSet,false); }
void VPictureData_GDIBitmap::DrawInPortRef(PortRef inPortRef,const VRect& r,VPictureDrawSettings* inSet)const { xDraw(GetHBitmap(),inPortRef,r,inSet); }