CDialogSK - A Skinnable Dialog Class

简介: Introduction This class is derived from the MFC CDialog. It supports the following features :- If running on Windows 2000 or Windows XP, make any o...

Introduction

This class is derived from the MFC CDialog. It supports the following features :-

  1. If running on Windows 2000 or Windows XP, make any one color transparent so that you can see through regions of the dialog
  2. If running on Windows 2000 or Windows XP, make the whole dialog translucent
  3. Adding a bitmap to the back ground. The bitmap can be a resource, a BMP file, or a HBITMAP
  4. Set style for background : Tile, Center, Stretch, resize dialog to the size of the bitmap
  5. 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

目录
相关文章
|
12天前
|
前端开发 JavaScript
Class 与 Style 绑定1
Class 与 Style 绑定1
|
21天前
Dialog从0到1
Dialog从0到1
24 0
|
12天前
|
前端开发 JavaScript
Class 与 Style 绑定2
Class 与 Style 绑定2
|
9月前
|
JavaScript 前端开发 索引
|
12月前
|
前端开发 JavaScript
class与style绑定
class与style绑定
77 0
|
存储 缓存 安全
为什么不能使用 Application Context 显示 Dialog?
为什么不能使用 Application Context 显示 Dialog?
为什么不能使用 Application Context 显示 Dialog?
Dialog显示引起的问题 Activity has leaked window DecorView@5704632[] that was originally added here
Dialog显示引起的问题 Activity has leaked window DecorView@5704632[] that was originally added here
|
Java
Could not find class 'android.support.v4.view.ViewPager', referenced from method***
Could not find class 'android.support.v4.view.ViewPager', referenced from method***
121 0
Could not find class 'android.support.v4.view.ViewPager', referenced from method***
BSP UI Workbench double click component and see view list
BSP UI Workbench double click component and see view list
BSP UI Workbench double click component and see view list
|
数据安全/隐私保护 Android开发
Dialog的使用
概述 Dialog是Android的提示框,虽然说是很基础的东西,但是里面其实还有很多值得学习交流的地方。本文将从以下三个方面学习Dialog:      1.
1182 0

热门文章

最新文章