设置或取消窗口顶层属性
来源:互联网 发布:仿阿里云首页效果 编辑:程序博客网 时间:2024/05/02 02:46
设置窗口顶层:
//SetWindowLong(hWnd,GWL_EXSTYLE,GetWindowLong(hWnd,GWL_EXSTYLE) | WS_EX_TOPMOST);
SetWindowPos(hWnd,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE | SWP_NOSIZE);
SetWindowPos(hWnd,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE | SWP_NOSIZE);
If you have changed certain window data usingSetWindowLong, you must callSetWindowPos to have the changes take effect.
取消窗口顶层:
取消窗口顶层:
SetWindowPos(hWnd,HWND_NOTOPMOST ,0,0,0,0,SWP_NOMOVE | SWP_NOSIZE);
The SetWindowPos function changes the size, position, and Z order of a child, pop-up, or top-level window. Child, pop-up, and top-level windows are ordered according to their appearance on the screen. The topmost window receives the highest rank and is the first window in the Z order.
BOOL SetWindowPos( HWND hWnd, // handle to window HWND hWndInsertAfter, // placement-order handle int X, // horizontal position int Y, // vertical position int cx, // width int cy, // height UINT uFlags // window-positioning flags);
也就是改变SetWindowLong不起作用,必须用SetWindowPos
判断是否具有WS_EX_TOPMOST窗口属性
if( GetWindowLong(this->Handle, GWL_EXSTYLE) & WS_EX_TOPMOST ) Caption= "WS_EX_TOPMOST";
else
Caption="no";
- 设置或取消窗口顶层属性
- 设置为顶层窗口
- 取消窗口置顶属性
- MFC设置对话框窗口位于所有窗口的最顶层
- JQuery 设置或取消事件
- WIN10 设置或取消自动关机
- Window 窗口属性及嵌入窗口到D3D渲染窗口顶层
- vc窗口顶层显示
- 遍历所有顶层窗口
- 窗口顶层显示
- android 顶层浮动窗口
- IE取消或设置代理服务器脚本
- IE取消或设置代理服务器脚本
- 用C#设置或取消开机启动
- win10如何设置或取消屏保密码
- UltraEdit设置或取消文件保存备份
- 透明窗口. 顶层窗口.总结
- 如何将当前窗口带到带到最顶层,并设置为活动窗口
- View和ViewGroup
- Java之美之Exception
- Android onNewIntent
- Android NFC Demo如何模拟Tag?
- VS2008编C的时候,scanf怎么会报警告
- 设置或取消窗口顶层属性
- midi标准音色表
- DWZ 1.4.3 中主从结构BUG问题
- 内存池的实现(一)
- Android中的SharedPreferences陷阱 [转]
- oracle 数据库插入时间
- 在php中使用sockets:从新闻组中获取文章
- c++面试必须知道的问题
- iOS 禁用多控件同时点击 笔记