如何创建一个alwaysontop窗口 [英] how to create a window alwaysontop
本文介绍了如何创建一个alwaysontop窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道SetWindowPos,但是它不能在所有状态下工作.如果打开另一个Alwaysontop应用程序或用户按Windows + D等...
i know SetWindowPos but it not work in all state . if open an other alwaysontop application or user press windows+D and so on ...
推荐答案
在创建窗口时,添加(按位或)扩展的Windows样式,请参阅:
http://msdn.microsoft.com/en-us/library/ff700543 (v = vs.85).aspx [ http://msdn.microsoft.com/en-us/library/61fe4bte (v = VS.100).aspx [ http://msdn.microsoft.com/en-us/library/ms633591(v=vs.85).aspx [
When creating a window, add (bitwise OR) extended windows styleWS_EX_TOPMOST
, see:
http://msdn.microsoft.com/en-us/library/ff700543(v=vs.85).aspx[^],
http://msdn.microsoft.com/en-us/library/61fe4bte(v=VS.100).aspx[^].
You can use Windows APISetWindowLong
to modify the style, see http://msdn.microsoft.com/en-us/library/ms633591(v=vs.85).aspx[^].
A second parameter of the call toSetWindowLong
must beGWL_EXSTYLE
.
—SA
不再支持系统模式行为,请参见 ^ ]和提供的链接到有关MSDN文章使用TrapKeys禁用Windows XP中的密钥"的链接" [ ^ ].
System modal beahviour is no longer supported, see Creating a system modal dialog box[^] at CodeGuru and the provided link to the MSDN article on "Disabling Keys in Windows XP with TrapKeys"[^].
在资源视图上,窗口的属性必须设置为TRUE(最上层).
On resource view , the property of window must set TRUE(Topmost).
这篇关于如何创建一个alwaysontop窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文