Hi,
I need to paste one device context onto another at the specified coordinates. How can I do this?
//*****************************************************************************************************************************
//* BT_DRAW_HDC_TO_HDC (hDC1, x1, y1, Width1, Height1, hDC2, x2, y2, Width2, Height2, Mode_Stretch, Action, Color_Transp)
//*****************************************************************************************************************************
// Action
#define BT_HDC_OPAQUE 0
#define BT_HDC_TRANSPARENT 1
HB_FUNC (BT_DRAW_HDC_TO_HDC)
{
HDC hDC1, hDC2;
INT x1, y1, Width1, Height1, x2, y2, Width2, Height2;
INT Mode_Stretch, Action;
COLORREF color_transp;
POINT Point;
hDC1 = (HDC) HMG_parnl (1);
x1 = (INT) hb_parni (2);
y1 = (INT) hb_parni (3);
Width1 = (INT) hb_parni (4);
Height1 = (INT) hb_parni (5);
hDC2 = (HDC) HMG_parnl (6);
x2 = (INT) hb_parni (7);
y2 = (INT) hb_parni (8);
Width2 = (INT) hb_parni (9);
Height2 = (INT) hb_parni (10);
Mode_Stretch = (INT) hb_parni (11);
Action = (INT) hb_parni (12);
color_transp = (COLORREF) hb_parnl (13);
bt_bmp_adjust_rect (&Width1, &Height1, &Width2, &Height2, Mode_Stretch);
//SetStretchBltMode (hDC1, COLORONCOLOR);
GetBrushOrgEx (hDC1, &Point);
SetStretchBltMode (hDC1, HALFTONE);
SetBrushOrgEx (hDC1, Point.x, Point.y, NULL);
switch (Action)
{ case BT_HDC_OPAQUE:
StretchBlt(hDC1, x1, y1, Width1, Height1, hDC2, x2, y2, Width2, Height2, SRCCOPY);
break;
case BT_HDC_TRANSPARENT:
TransparentBlt(hDC1, x1, y1, Width1, Height1, hDC2, x2, y2, Width2, Height2, color_transp);
break;
default:
hb_retl (FALSE);
return;
}
hb_retl (TRUE);
}
Natter wrote:Jimmy, I compiled your example. References to bt_bmp_adjust_rect and HMG_parnl are not recognized
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Exabot [Bot] and 51 guests