加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

winapi – Win32 CreatePatternBrush

发布时间:2020-12-14 02:08:21 所属栏目:Windows 来源:网络整理
导读:MSDN为CreatePatternBrush显示以下内容: You can delete a pattern brush without affecting the associated bitmap by using the DeleteObject function. Therefore,you can then use this bitmap to create any number of pattern brushes. 我的问题恰恰
MSDN为CreatePatternBrush显示以下内容:

You can delete a pattern brush without
affecting the associated bitmap by
using the DeleteObject function.
Therefore,you can then use this
bitmap to create any number of pattern
brushes.

我的问题恰恰相反.如果HBRUSH存在很长时间,我可以在创建画笔后立即删除HBITMAP吗? IE:HBRUSH是否存储了自己的HBITMAP副本?

在这种情况下,我希望HBRUSH具有对象范围,而HBITMAP具有方法范围(创建HBRUSH的方法).

解决方法

HBRUSH和HBITMAP完全独立.可以完全相互独立地删除句柄,并且一旦创建,对任一对象的任何更改都不会影响另一个.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读