Introduction
This class is derived from the MFC CDialog
. It supports the following features :-
- If running on Windows 2000 or Windows XP, make any one color transparent so that you can see through regions of the dialog
- If running on Windows 2000 or Windows XP, make the whole dialog translucent
- Adding a bitmap to the back ground. The bitmap can be a resource, a BMP file, or a
HBITMAP
- Set style for background : Tile, Center, Stretch, resize dialog to the size of the bitmap
- Can enable/disable moving the dialog by clicking anywhere in it
Previous to Windows 2000 creating skinned dialogs were a bit difficult. You needed to write functions that could parse through the back ground image and create a CRgn
that defined the shape of the skin. This could be done using repetitive calls to CRgn::CombineRgn
for part of the image you wanted to see on the dialog. After creating the whole region you need to call CWnd::SetWindowRgn
with a handle to the combined CRgn
object.
From Windows 2000 a new API SetLayeredWindowAttributes
has been added to User32.dll. This class uses that to create skinned dialogs. However the background bitmap feature is not dependent on OS version and can be used on any version of Windows.
reference:http://www.codeproject.com/Articles/4509/CDialogSK-A-Skinnable-Dialog-Class
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 展开说说关于C#中ORM框架的用法!
2012-11-19 C++中MessageBox()的详细用法