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处理位图的更多相关文章

  1. Windows API 函数列表 附帮助手册

    所有Windows API函数列表,为了方便查询,也为了大家查找,所以整理一下贡献出来了. 帮助手册:700多个Windows API的函数手册 免费下载 API之网络函数 API之消息函数 API之 ...

  2. DELPHI下API简述(1800个API)

    DELPHI下API简述 http://zero.cnbct.org/show.asp?id=144 auxGetDevCaps API 获取附属设备容量 auxGetNumDevs API 返回附属 ...

  3. API函数

    1. API之网络函数 WNetAddConnection 创建同一个网络资源的永久性连接 WNetAddConnection2 创建同一个网络资源的连接 WNetAddConnection3 创建同 ...

  4. WINDOWS API 函数(超长,值得学习)

    一.隐藏和显示光标 函数: int ShowCursor ( BOOL bShow );  参数 bshow,为布尔型,bShow的值为False时隐藏光标,为True时显示光标:该函数的返回值为整型 ...

  5. linux API函数大全

    获取当前执行路径:getcwd1. API之网络函数 WNetAddConnection 创建同一个网络资源的永久性连接 WNetAddConnection2 创建同一个网络资源的连接 WNetAdd ...

  6. Delphi常用API,API函数

    auxGetDevCaps API 获取附属设备容量 auxGetNumDevs API 返回附属设备数量 auxGetVolume API 获取当前卷设置 auxOutMessage API 向输出 ...

  7. Windows API函数大全(精心总结)

    WindowsAPI函数大全(精心总结)    目录 1. API之网络函数... 1 2. API之消息函数... 1 3. API之文件处理函数... 2 4. API之打印函数... 5 5. ...

  8. WINDOWS-API:API函数大全

    操作系统除了协调应用程序的执行.内存分配.系统资源管理外,同时也是一个很大的服务中心,调用这个服务中心的各种服务(每一种服务是一个函数),可以帮肋应用程序达到开启视窗.描绘图形.使用周边设备的目的,由 ...

  9. Windows API函数大全三

    7. API之位图.图标和光栅运算函数 BitBlt 将一幅位图从一个设备场景复制到另一个 CopyIcon 制作指定图标或鼠标指针的一个副本.这个副本从属于发出调用的应用程序 CopyImage 复 ...

随机推荐

  1. 在Firefox中发现一个在Linux下查看chm文档的插件

    在Firefox浏览器插件中搜索插件chmfox插件,安装后就可以在linux下通过Firefox浏览器阅读chm文档了.

  2. TStringGrid的Rows索引值 和 Cells的 索引值, Row的赋值

    Caption := sgShopList.Rows[sgShopList.RowCount +].CommaText; Caption := sgShopList.Rows[sgShopList.R ...

  3. Facebook的工程师文化——《打造facebook》读后感

    在今年北京的QCon大会上听了facebook早期中国籍工程师王淮的演讲,受益匪浅,主题是如何打造高效能团队,主要介绍他在facebook的一些经历和管理上的经验分享.现在的他是一名天使投资人,投资的 ...

  4. Java例子

    1. 本章学习总结 今天主要学习了三个知识点 封装 继承 多态 2. 书面作业 Q1. java HelloWorld命令中,HelloWorld这个参数是什么含义? 今天学了一个重要的命令javac ...

  5. copy assign retain 修饰属性的set 方法

    @property (nonatomic,retain) NSString * name; - (void)setName:(NSString*)name { [name retain];   把传进 ...

  6. PostgreSQL脱敏示例

    mydb=# create table test_desensitization(id integer, name varchar(32), phone_num varchar(11)); CREAT ...

  7. ElasticSearch(一):windows下安装ElasticSearch6.3.2

    前言 最近开始学习ElasticSearch,从官网上下载的最新版的es,但是网上安装教程大部分是早期5.X版本的,因为6.x版本出现了不同,所以记录下. 正文 1. 下载ElasticSearch ...

  8. Springboot - 建立简单的用户登录系统

    在开始编码前,先建立几个Package(可以按个人习惯命名),如图 1.Controllers 用于存放控制器类 2.Models 用于存放数据实体类 3.Repositories 用于存放数据库操作 ...

  9. LG2831 愤怒的小鸟

    题意 分析 看n的范围只有18,考虑状压dp. 用\(f(s)\)表示过集合s中的点所需最小的抛物线数量. 然后枚举点对算抛物线,判断其他点是否在抛物线上来转移. 细节 判断能否构成抛物线只需要判断斜 ...

  10. list_for_each与list_for_each_entry具体解释

    一.list_for_each 1.list_for_each原型#define list_for_each(pos, head) \     for (pos = (head)->next, ...