更改对话框的形状 [英] Change the shape of Dialog box

查看:88
本文介绍了更改对话框的形状的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我希望对话框采用某种新形状,例如三角形或圆形或任意形状(正方形和矩形除外),那么是否可以?如果是,请发送完整的代码给我,如果不可以,为什么不呢?
如果上述问题的解决方案无法在MFC中使用,那么是否可以在其他任何C ++平台中使用?

If I want my dialog box in some new shape like triangle or circle or any arbitrary shape ( except square and rectangle) then is it possible or not? If yes then please send me whole code and if no then why no?
And if above question''s solution is not possible in MFC then is it possible in any other platform of C++ or not?

推荐答案

简短的回答是否" ,作为用于创建对话框的Windows类中设置的对话框的标准.但是,您可以使用自己设计的标准窗口并通过窗口蒙皮 [ ^ ]来实现您想要的功能.
The short answer is "No", as the standard for a dialog box is set in the Windows class used to create it. However, you could possibly use a standard Window of your own design and modify its shape by Window Skinning[^] to achieve what you want.


您可以为此使用SetWindowRgn API函数.(也可以在分层的窗口中查看半透明的背景.可能对您来说很有趣.)

jkchan
http://cgmath.blogspot.com
you can use the SetWindowRgn API function for that.. (Also look layered windows for translucent backgrounds. may be interesting for you.)

jkchan
http://cgmath.blogspot.com


是的,您可以制作具有不同外观的不规则对话框.

看看下面的链接

http://www.codeguru.com/cpp/wd/dislog/bitmapsimages/article. php/c4977 [ ^ ]
Yes you can make irregular dialog box with different skins.

have a look at below link

http://www.codeguru.com/cpp/w-d/dislog/bitmapsimages/article.php/c4977[^]


这篇关于更改对话框的形状的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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