PC Camera 开发日志(二十三)------ WND的Z-Order
来源:互联网 发布:java读取linux文件 编辑:程序博客网 时间:2024/05/16 10:16
老实说我每次使用SetWindowPos()这个函数的第一个参数就是来设置Z-Order的。而我每次基本都不写这个参数。记起来上次去面试好像被问道这个问题。
所以今天花费一点时间搜索一下。
============= Explanation One ======================
Z Order
The Z order of a window indicates the window's position in a stack of overlapping windows. This window stack is oriented along an imaginary axis, the z-axis, extending outward from the screen. The window at the top of the Z order overlaps all other windows. The window at the bottom of the Z order is overlapped by all other windows.
The system maintains the Z order in a single list. It adds windows to the Z order based on whether they are topmost windows, top-level windows, or child windows. A topmost window overlaps all other non-topmost windows, regardless of whether it is the active or foreground window. A topmost window has the WS_EX_TOPMOST style. All topmost windows appear in the Z order before any non-topmost windows. A child window is grouped with its parent in Z order.
When an application creates a window, the system puts it at the top of the Z order for windows of the same type. You can use the BringWindowToTop function to bring a window to the top of the Z order for windows of the same type. You can rearrange the Z order by using the SetWindowPos and DeferWindowPos functions.
The user changes the Z order by activating a different window. The system positions the active window at the top of the Z order for windows of the same type. When a window comes to the top of Z order, so do its child windows. You can use the GetTopWindow function to search all child windows of a parent window and return a handle to the child window that is highest in Z order. The GetNextWindow function retrieves a handle to the next or previous window in Z order.
================== Expalanation Two ===============
Z轴是垂直于你的显示器平面的。方向是从里向外的。通常情况下是以桌面为底的,其他窗口就象羊肉串一样串在这跟轴上。但和羊肉串不一样的是我们可以通过BringWindowToTop、SetWindowsPos、SetForegroundWindows来该变窗口在Z轴的位置
================== Expalanation Three ===============
http://writeblog.csdn.net/PostEditPlain.aspx
这个是开源的代码,估计能很好的说明我们要理解的了。其他找到的解释都差不多。
To Be Continued..........
- PC Camera 开发日志(二十三)------ WND的Z-Order
- PC Camera开发日志(十三)------ 窗口贴图闪烁问题
- PC Camera开发日志(二十二)------ 系统中控件默认的长宽值
- PC Camera开发日志(二)------ 流行Camera APP比较分析
- PC Camera开发日志(十二)------ 窗口的依附
- PC Camera 开发日志(二十)------- 窗口背景贴图(图覆盖整个窗口)
- PC Camera开发日志(二十一)---- 窗口透明化处理
- PC Camera 开发日志(二十四)------ 网上免费图标下载地址
- PC Camera开发日志(二十六)--- INI文件中某段SECTION删除
- PC Camera开发日志(十一)------ TTPLAYER UI 分析
- PC Camera 开发日志(十六)------- INI 文件读写
- PC Camera开发日志(十七)------- CWindow::Invalidate()
- PC Camera开发日志(十八)------- 非模态对话框
- PC Camera 开发日志(五)------ 应用程序最小化系统托盘参考
- PC Camera开发日志(十)------ Version2.0时代到来
- PC Camera开发日志(十五)---- 基于MFC的大型数据文件处理方法
- PC Camera 开发日志(六)------ 一种可换皮肤的对话框实现
- PC Camera 开发日志(九)------ Camera Preview和Record原理
- C#常用函数
- Truezip 使用实例
- 如何在ADO中用异步的方式打开一个RecordSet
- ACE 开发者 很多p2p信息
- Java常用参数及其作用
- PC Camera 开发日志(二十三)------ WND的Z-Order
- 给SQL Server传送数组参数
- security.jar
- COM组件设计与应用(九)---IDispatch 接口 for vc6.0
- Fedora5下构造内核树
- Java数据库连接
- Windows快捷键大全
- 水晶报表push模式的应用
- linux下的网络分析Tcpdump命令的使用