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. HDU 1069 Monkey and Banana 基础DP

    题目链接:Monkey and Banana 大意:给出n种箱子的长宽高.每种不限个数.可以堆叠.询问可以达到的最高高度是多少. 要求两个箱子堆叠的时候叠加的面.上面的面的两维长度都严格小于下面的. ...

  2. django-pure-pagination使用方法

    1.pip install django-pure-pagination  安装包. 2.加入app: 'pure_pagination', 3.在view中写入分布逻辑. try: page = r ...

  3. mysql远程连接的设置

    有时数据库所在机器与项目运行的机器不是同一个,那么就涉及到远程链接数据库了,配置远程连接数据库的步骤如下: 1.查看mysql数据库中,user表中的信息,如下图,先使用use mysql切换到mys ...

  4. LRY_FX_Assist(辅助EA)

    功能说明 辅助EA就是别的EA没有功能用这个EA来弥补,比如说风控设置(预付款.浮亏.加仓层数等达到多少进行操作),移动止损(包括隐藏移动止损),启动马丁加仓等.这个EA不能自己独立开单,只能辅助其它 ...

  5. linux内存查看工具

    这里帮你总结了一下Linux下查看内存使用情况的多种方法~ 在做 Linux 系统优化的时候,物理内存是其中最重要的一方面.自然的,Linux 也提供了非常多的方法来监控宝贵的内存资源的使用情况.下面 ...

  6. Codeforces 989A:A Blend of Springtime

    A. A Blend of Springtime time limit per test 1 second memory limit per test 256 megabytes input stan ...

  7. python urllib2 error handling

    python 2 里面的下载实现. https://stackoverflow.com/questions/666022/what-errors-exceptions-do-i-need-to-han ...

  8. AbstractBeanDefinition:lenientConstructorResolution属性源码分析

    版本:spring-framework-4.1 一概述 在看AbstractBeanDefinition源码时,注意到lenientConstructorResolution属性有诸多不疑,现在通过示 ...

  9. ETA6093 或 ETA9741 ETA9742 的 TYPE-C 的资料收集

    ETA6093 或 ETA9741 ETA9742 的 TYPE-C 的资料收集 因为项目使用. 这个 IC 好玩,但是还是有一些需要注意的. 对我有用的信息. http://www.great-et ...

  10. java的static研究

    (1)static关键字:可以用于修饰属性.方法和类. 1,属性:无论一个类生成了多少个对象,所有这些对象共同使用唯一的一份静态的成员变量(不能修饰临时变量 2,方法:static修饰的方法叫做静态, ...