void TransparentBlt2( HDC hdc0,
int nX0,int nY0,
int nW0,int nH0,
HDC hdc1,
int nX1,int nY1,
int nW1,int nH1,
UINT Tcol
)
{ HBITMAP hBMP =CreateCompatibleBitmap(hdc0,nW0, nH0);
HBITMAP mBMP =CreateBitmap(nW0,nH0,1,1,NULL);
HDC hDC =CreateCompatibleDC(hdc0);
HDC mDC =CreateCompatibleDC(hdc0);
HBITMAP oldBMP =(HBITMAP)SelectObject(hDC, hBMP);
HBITMAP oldmBMP=(HBITMAP)SelectObject(mDC, mBMP);
if (nW0==nW1&&nH0==nH1)
BitBlt(hDC,0,0,nW0,nH0,hdc1,nX1,nY1,SRCCOPY);
else
StretchBlt(hDC,0,0,nW0,nH0,hdc1,nX1,nY1,nW1,nH1,SRCCOPY);
SetBkColor(hDC, Tcol);
BitBlt(mDC,0,0,nW0,nH0,hDC,0,0,SRCCOPY);
SetBkColor(hDC, RGB(0,0,0));
SetTextColor(hDC, RGB(255,255,255));
BitBlt(hDC,0,0,nW0,nH0,mDC,0,0,SRCAND);
SetBkColor(hdc0,RGB(255,255,255));
SetTextColor(hdc0,RGB(0,0,0));
BitBlt(hdc0,nX0,nY0,nW0,nH0,mDC,0,0,SRCAND);
BitBlt(hdc0,nX0,nY0,nW0,nH0,hDC,0,0,SRCPAINT);
SelectObject(hDC, oldBMP);
DeleteDC(hDC);
SelectObject(mDC, oldmBMP);
DeleteDC(mDC);
DeleteObject(hBMP);
DeleteObject(mBMP);
}
int nX0,int nY0,
int nW0,int nH0,
HDC hdc1,
int nX1,int nY1,
int nW1,int nH1,
UINT Tcol
)
{ HBITMAP hBMP =CreateCompatibleBitmap(hdc0,nW0, nH0);
HBITMAP mBMP =CreateBitmap(nW0,nH0,1,1,NULL);
HDC hDC =CreateCompatibleDC(hdc0);
HDC mDC =CreateCompatibleDC(hdc0);
HBITMAP oldBMP =(HBITMAP)SelectObject(hDC, hBMP);
HBITMAP oldmBMP=(HBITMAP)SelectObject(mDC, mBMP);
if (nW0==nW1&&nH0==nH1)
BitBlt(hDC,0,0,nW0,nH0,hdc1,nX1,nY1,SRCCOPY);
else
StretchBlt(hDC,0,0,nW0,nH0,hdc1,nX1,nY1,nW1,nH1,SRCCOPY);
SetBkColor(hDC, Tcol);
BitBlt(mDC,0,0,nW0,nH0,hDC,0,0,SRCCOPY);
SetBkColor(hDC, RGB(0,0,0));
SetTextColor(hDC, RGB(255,255,255));
BitBlt(hDC,0,0,nW0,nH0,mDC,0,0,SRCAND);
SetBkColor(hdc0,RGB(255,255,255));
SetTextColor(hdc0,RGB(0,0,0));
BitBlt(hdc0,nX0,nY0,nW0,nH0,mDC,0,0,SRCAND);
BitBlt(hdc0,nX0,nY0,nW0,nH0,hDC,0,0,SRCPAINT);
SelectObject(hDC, oldBMP);
DeleteDC(hDC);
SelectObject(mDC, oldmBMP);
DeleteDC(mDC);
DeleteObject(hBMP);
DeleteObject(mBMP);
}