用API处理位图
procedure TForm1.Button1Click(Sender: TObject);
var
dc : hdc;
MemDc : hdc;
MemBitmap : hBitmap;
OldMemBitmap : hBitmap;
begin {Get the handle to the screen's dc}
dc := GetDc(); {Create and retrieve a handle to a memory dc based on the screen}
MemDc := CreateCompatibleDc(dc); {Create a bitmap that is compatible with the display.}
{Note: if you pass "MemDc" to CreateCompatibleBitmap()}
{instead of "dc", you will get a monochrome bitmap!}
MemBitmap := CreateCompatibleBitmap(dc, , ); {Release the screen dc}
ReleaseDc(, dc); {Select the bitmap surface into the MemDc}
{remembering the default bitmap}
OldMemBitmap := SelectObject(MemDc, MemBitmap); {Draw on the MemoryDc}
PatBlt(MemDc, , , , , WHITENESS);
Ellipse(MemDc, , , , ); {Copy the MemDc to the Form Canvas}
BitBlt(Form1.Canvas.Handle,
, ,
, ,
MemDc,
, ,
SRCCOPY); {Select the default bitmap back into the memory dc}
SelectObject(MemDc, OldMemBitmap); {Note: You can now use the memory bitmap handle with}
{functions such as GetDiBits()} {Delete the Memory Bitmap}
DeleteObject(MemBitmap); {Delete the MemoryDc}
DeleteDc(MemDc); end;
用API处理位图的更多相关文章
- Windows API 函数列表 附帮助手册
所有Windows API函数列表,为了方便查询,也为了大家查找,所以整理一下贡献出来了. 帮助手册:700多个Windows API的函数手册 免费下载 API之网络函数 API之消息函数 API之 ...
- DELPHI下API简述(1800个API)
DELPHI下API简述 http://zero.cnbct.org/show.asp?id=144 auxGetDevCaps API 获取附属设备容量 auxGetNumDevs API 返回附属 ...
- API函数
1. API之网络函数 WNetAddConnection 创建同一个网络资源的永久性连接 WNetAddConnection2 创建同一个网络资源的连接 WNetAddConnection3 创建同 ...
- WINDOWS API 函数(超长,值得学习)
一.隐藏和显示光标 函数: int ShowCursor ( BOOL bShow ); 参数 bshow,为布尔型,bShow的值为False时隐藏光标,为True时显示光标:该函数的返回值为整型 ...
- linux API函数大全
获取当前执行路径:getcwd1. API之网络函数 WNetAddConnection 创建同一个网络资源的永久性连接 WNetAddConnection2 创建同一个网络资源的连接 WNetAdd ...
- Delphi常用API,API函数
auxGetDevCaps API 获取附属设备容量 auxGetNumDevs API 返回附属设备数量 auxGetVolume API 获取当前卷设置 auxOutMessage API 向输出 ...
- Windows API函数大全(精心总结)
WindowsAPI函数大全(精心总结) 目录 1. API之网络函数... 1 2. API之消息函数... 1 3. API之文件处理函数... 2 4. API之打印函数... 5 5. ...
- WINDOWS-API:API函数大全
操作系统除了协调应用程序的执行.内存分配.系统资源管理外,同时也是一个很大的服务中心,调用这个服务中心的各种服务(每一种服务是一个函数),可以帮肋应用程序达到开启视窗.描绘图形.使用周边设备的目的,由 ...
- Windows API函数大全三
7. API之位图.图标和光栅运算函数 BitBlt 将一幅位图从一个设备场景复制到另一个 CopyIcon 制作指定图标或鼠标指针的一个副本.这个副本从属于发出调用的应用程序 CopyImage 复 ...
随机推荐
- 哈理工OJ 1328
感觉其实可以不水的. //好像是一道特别水的小学数学题.但是我确实看了很久有试了几个样例才懂得.T_T // 先判断是不是素数.如果是素数的话.An-1一定不等于An.否则的话. // 继续找如果有一 ...
- 转载:【Oracle 集群】RAC知识图文详细教程(九)--RAC基本测试与使用
文章导航 集群概念介绍(一) ORACLE集群概念和原理(二) RAC 工作原理和相关组件(三) 缓存融合技术(四) RAC 特殊问题和实战经验(五) ORACLE 11 G版本2 RAC在LINUX ...
- hdu 6154 CaoHaha's staff
CaoHaha's staff Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)T ...
- C# 对json对象嵌套数组
看图: 这里可以看到是二层嵌套!!使用C#如何实现?? 思路:使用list集合实现 → 建立类 → list集合 → 微软的 Newtonsoft.Json (一款.NET中开源的Json序列化 ...
- hashcode()和equals()方法
(一)hashcode(): 当Set接收一个元素时根据该对象的内存地址算出hashCode,看它属于哪一个区间,再这个区间里调用equeals方法.这里需要注意的是:当俩个对象的hashCode值相 ...
- swift 分页视图
var data:NSArray! var scrollView: UIScrollView! var pageCtrl: UIPageControl! override func viewDidLo ...
- Codeforces 106A:Card Game
题目链接http://codeforces.com/contest/106/problem/A 题意:一套牌有S.H.D.C四种花色,按等级分成6.7.8.9.T.J.Q.K.A.每次选出一个花色作为 ...
- scanf()与gets()的区别
scanf()与gets()的区别 1.scanf()可以同时接受多个字符串,而gets()一次只能接受一个字符串. #include<stdio.h>int main(){ char s ...
- java代码块执行顺序
父类 public class Father { public Father() { System.out.println("父类构造PUBLIC father"); } stat ...
- mysql中distinct
1.Distinct 位置 单独的distinct只能放在开头,否则报错,语法错误,与其他函数使用时候,没有位置限制如下 Select player_id,count(distinct(task_id ...