如何获取对话框的属性? [英] How To Get A Dialog's Properties?

查看:132
本文介绍了如何获取对话框的属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要控制对话框的属性值.它具有一个名为TopMost的属性.属性的值类型为true和false.
我有两个对话框,一个是屏幕,用于显示DTV,另一个是控制屏幕的模式.
我想使屏幕对话框的Z顺序达到TopMost.
如何获取对话框属性?

你能给我一些建议吗?
非常感谢.

I want to control a dialog''s property value . It has a property named TopMost. The values type of Property are true and false.
I have two dialog, one,screen, is to display DTV, another one is to control the screen''s mode.
I want to make the screen dialog''s Z-Order up to the TopMost.
How can I do to get the dialog property?

Could you give me some suggestion.
Thank you a lot.

推荐答案

假定您正在使用Win32,则需要按照
Assuming you are using Win32 then you need to set and unset the dialog''s WS_EX_TOPMOST style as described here[^].


在运行时更改z顺序,请使用 SetWindowPos [ ^ ]函数.
To change the z-order at runtime, use the SetWindowPos[^] function.


我不明白这个问题.但是,如果要将窗口显示在其他窗口之上,则需要调用BringWindowToTop.如果要将窗口置于顶部并使其处于活动状态,则应改为调用SetForegroundWindow.
如果要更改最上面的属性,则必须通过GetWindowLong获取并由SetWindowLong设置.了解有关Windows样式和扩展样式的更多信息.
I don''t understand the question. But if you want to show your window on top of other ones, then you need to call BringWindowToTop. If you want to bring the window to top and make it active, you should call SetForegroundWindow instead.
If you want to change the top most attribute, then you have to get it by GetWindowLong and set by SetWindowLong. Read more about windows styles and extended styles.


这篇关于如何获取对话框的属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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