开发者

Can two DCs share one GDI object (brush, pen, etc.)?

开发者 https://www.devze.com 2023-01-28 13:37 出处:网络
Can two device contexts (DCs) share one GDI object, such as 开发者_C百科a brush or a pen?The documentation for SelectObject mentions that Bitmaps cannot be selected into more than one DC at a time.

Can two device contexts (DCs) share one GDI object, such as 开发者_C百科a brush or a pen?


The documentation for SelectObject mentions that Bitmaps cannot be selected into more than one DC at a time.

Essentially this is because GDI operations can write to a bitmap, and it would be complex to manage multiple write operations at a time. However all the other GDI objects, once created (with the exception of regions - but those are always copied), are immutable, therefore have no restrictions on being selected into multiple DCs at a time.

0

精彩评论

暂无评论...
验证码 换一张
取 消