标题: 在屏幕上任何地方画图
逸风
管理员
Rank: 9
历史尘埃


UID 15
精华 3
积分 4586
帖子 3405
威望 7091
金币 1073
热心 1344
阅读权限 102
注册 2005-7-28
来自 南京
状态 离线

用支付宝求购
在屏幕上任何地方画图

可以用你的程序在屏幕上的任何地方画图,效果就象电子宠物一样很简单,只要两个API 



The first one is getdesktopwindow and the other is getwindowdc 



the detail you can see the Win32 help which was plused in Delphi4 



For example: you paste a bitmap on the screen 



var wnd:longint; 



mydc,bitmapdc:Hdc; 



mybitmap:Tbitmap; 



mybitmap:=Tbitmap.create(); 



mybitmap.loadfromfile('c:\windows\waves.bmp'); 



bitmapdc:=getwindowdc(mybitmap.handle); 



wnd:=getdesktopwindow(); 



mydc:=getwindowdc(wnd); 



bitblt(my....... //I forget the detail if you have any questions can


转自:  编程联盟

顶部
[广告] 免费域名(Free Subdomain) 免费空间(Free hosting) PR查询(Google Pagerank)



当前时区 GMT+8, 现在时间是 2008-12-2 00:00
信产部ICP备案:京ICP备05066424号 北京市公安局网监备案:1101050648号

Powered by Discuz! 5.5.0
清除 Cookies - 联系我们 - 网友俱乐部 - Archiver - WAP