怎样让用API创建的窗口不被最小化? ( 积分: 100 )

  • 主题发起人 apacheii
  • 开始时间
-&gt; &quot;再把它最小化掉&quot;<br>这句话看不懂啊,指biMinimize设成False?那就是去除WS_MINIMIZEBOX风格即可!
 
&gt;这个办法根本没用啊,程序一运行就不断的最小,还原,又最小,还原。。。。。。<br>我这边怎么没有这种情况?<br><br>&gt;我想如果能自己定义DefWindowProc应该有办法了吧。<br>DefWindowProc也只不过是消息处理过程
 
等着我来解决......
 
Application.HookMainformproc
 
学QQ窗口子类化。。消息过滤。。。不然学天堂消息加密。。[:D][:D][:D]
 
光能处理最小化按钮消息,Win + D处理不了,好像没有楼主说的动画,难道我的机器太好了?<br><br>unit Main;<br><br>interface<br><br>uses<br> &nbsp; &nbsp;Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,<br> &nbsp; &nbsp;Dialogs, StdCtrls;<br><br>type<br> &nbsp; &nbsp;TForm1 = class(TForm)<br> &nbsp; &nbsp; &nbsp; &nbsp;Button1: TButton;<br> &nbsp; &nbsp;private<br> &nbsp; &nbsp;public<br> &nbsp; &nbsp; &nbsp; &nbsp;{ Public declarations }<br> &nbsp; &nbsp; &nbsp; &nbsp;procedure OnMin(var Msg: TMessage); message WM_SYSCOMMAND;<br> &nbsp; &nbsp;end;<br><br>var<br> &nbsp; &nbsp;Form1: TForm1;<br><br>implementation<br><br>{$R *.DFM}<br><br>procedure TForm1.OnMin(var Msg: TMessage);<br>begin<br> &nbsp; &nbsp;if Msg.WParam = SC_MINIMIZE then begin<br> &nbsp; &nbsp; &nbsp; &nbsp;TWMSize(Msg).Result := -1;<br> &nbsp; &nbsp;end<br> &nbsp; &nbsp;else<br> &nbsp; &nbsp; &nbsp; &nbsp;inherited;<br>end;<br><br><br>end.
 
Win + D是显示桌面,并不是把窗口最小化。。。。。。
 
但是Win + D却把所有窗口都最小化了,看来我还没有理解透,我上面的代码是不是也没有符合楼主的要求
 
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/objects/shell/shell.asp<br><br>处理WIN+D的是那个MinimizeAll方法。
 
除了这个WM_SYSCOMMAND大概是没有直接的消息最小化吧。要知道,并非所有的动作都是依靠消息,windows本身就是个大杂烩。<br>Win+D或Win+M能极小化所有的窗口,但是对WS_EX_TOPMOST + WS_EX_TOOLWINDOW属性的窗体无效,qq登陆窗口大致就是这个。
 
是Window就可以被最小化,但是要達到妳的要求是可以的,其實沒有必要去處理什么Hook等<br>妳隻要不斷地讓這個window處于顯示狀態,于是當這個window被最小化的時候,馬上又顯示齣來,于是感覺上就&quot;不能最小化&quot;
 
算了,这个问题不再讨论了,都过了这么久了。。。。。。
 
无赖方法, 拦截ShowWindow调用, 肯定可以的 ..
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
537
import
I
I
回复
0
查看
560
import
I
顶部