How display a bitmap transparencly in a From(50分)

  • 主题发起人 主题发起人 xgd
  • 开始时间 开始时间
X

xgd

Unregistered / Unconfirmed
GUEST, unregistred user!
Don't use the Image Control,drectly draw a bitmap in the
form transparenly(as a background image),for example,put a
RichMemo Control in the Form,I can see the bitmap back the
RichMemo control.I hear of having a Win32 API Which can do
this,please Help me! Thank You!
 
AlphaBlend(
hdcDest: HDC; nXOriginDest, nYOriginDest, nWidthDest, hHeightDest: Integer;
hdcSrc: HDC; nXOriginSrc, nYOriginSrc, nWidthSrc, nHeightSrc:: Integer;
blendFunction: TBlendFunction
);
参数含义请查阅 WIN32 API 帮助
 
最简单的: Form.Canvas.BrushCopy

稍微复杂点的:
function TransparentStretchBlt(DstDC: HDC; DstX, DstY, DstW, DstH: Integer;
SrcDC: HDC; SrcX, SrcY, SrcW, SrcH: Integer; MaskDC: HDC; MaskX,
MaskY: Integer): Boolean;

(BTW: TCanvas.BrushCopy就是通过调用TransparentStretchBlt实现的).
 
多人接受答案了。
 

Similar threads

后退
顶部