如何从Brush对象获取Hbrush ??? [英] How to Get the Hbrush from Brush object???

查看:112
本文介绍了如何从Brush对象获取Hbrush ???的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有一个HBRUSH类型的画笔,我想在FillPath方法中使用它,但是问题是FillPath带有GDI + Brush对象,所以我不能直接使用它
,有没有方法可用于将HBRUSH对象类型转换为Brush对象??
请提出一些建议方法...

在此先感谢
Mahesh Mahindrakar ...

Hi
I have a brush of type HBRUSH and i want to use it inside FillPath method, but the problem is that FillPath takes GDI+ Brush object so i cant use it directly
so is there any method available to type cast HBRUSH object to Brush object???
please suggest some way to do this...

Thanks in advance
Mahesh Mahindrakar...

推荐答案

尝试这样的类(未经测试;我假设GpBrush *实际上只是类型安全的HBRUSH别名,我可能是错误的):
Try a class like this (untested; I'm assuming a GpBrush* is really just a typesafe HBRUSH alias, I could be wrong):


这篇关于如何从Brush对象获取Hbrush ???的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆