16,472
社区成员
发帖
与我相关
我的任务
分享
hBitmap=CreateCompatibleBitmap(hdc,(rect.right-rect.left),(rect.bottom-rect.top));
hold=(HBITMAP)SelectObject(hmem,hBitmap);//
case WM_PAINT:
hdc = BeginPaint(hwnd, &ps) ;
GetClientRect (hwnd, &rect) ;
rect.left = rect.right / 4 ;
rect.right = 3 * rect.right / 4 ;
rect.top = rect.bottom / 4 ;
rect.bottom = 3 * rect.bottom / 4 ;
PlayEnhMetaFile(hdc, hemf, &rect) ;
#if 1
hmem=CreateCompatibleDC(hdc);
hBitmap=CreateCompatibleBitmap(hdc,(rect.right-rect.left),(rect.bottom-rect.top));
hold=(HBITMAP)SelectObject(hmem,hBitmap);//
::BitBlt(hmem,0,0,(rect.right-rect.left),(rect.bottom-rect.top),hdc,rect.left,rect.top,SRCCOPY);
SelectObject(hmem,hold);//
OpenClipboard(0);
EmptyClipboard();
SetClipboardData(CF_BITMAP,hBitmap);
CloseClipboard();
SelectObject(hdcEMF,hBitmap);
#endif
EndPaint (hwnd, &ps) ;
return 0 ;