save CDC as Bitmap
C / C++ / MFC
2
Posts
2
Posters
0
Views
1
Watching
-
Hallo how do i copy a selected CDC regions to a bitmap variable?? (this are some complex expensive drawings that will not be changed very often.) Or is it cheaper to save the the drawing as a MemoryDC?? THX:doh:
Hello Like this HDC hdc=CreateCompatibleDC(GetDC()->m_hDC); HBITMAP hBit=CreateCompatibleBitmap(GetDC(),Width,Height); SelectObject(hdc,hBit);//hBit=(HBITMAP)SelectObject(hdc,hBit); BitBlt(hdc,0,0,400,400,GetDC()->m_hDC,0,0,SRCCOPY); SelectObject(hdc,hBit);//hBit=(HBITMAP)SelectObject(hdc,hBit);