您的位置:程序门 -> vc/mfc -> 界面



窗体最小化恢复?


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


窗体最小化恢复?[已结贴,结贴人:liagn]
发表于:2007-10-12 20:09:48 楼主
请问如何将一个最小化的对话框恢复为原有大小?
有一个对话框程序,在运行时将它最小化,过一段时间后希望能自动恢复原有大小,要如何实现???
发表于:2007-10-12 20:20:541楼 得分:0
想知道
发表于:2007-10-12 21:16:252楼 得分:15
不会看帮助吗?

用showwindow函数
showwindow(sw_restore);


sw_hide   hides   the   window   and   activates   another   window.  
sw_maximize   maximizes   the   specified   window.  
sw_minimize   minimizes   the   specified   window   and   activates   the   next   top-level   window   in   the   z   order.  
sw_restore   activates   and   displays   the   window.   if   the   window   is   minimized   or   maximized,   the   system   restores   it   to   its   original   size   and   position.   an   application   should   specify   this   flag   when   restoring   a   minimized   window.  
sw_show   activates   the   window   and   displays   it   in   its   current   size   and   position.    
sw_showdefault   sets   the   show   state   based   on   the   sw_   value   specified   in   the   startupinfo   structure   passed   to   the   createprocess   function   by   the   program   that   started   the   application.    
sw_showmaximized   activates   the   window   and   displays   it   as   a   maximized   window.  
发表于:2007-10-12 22:05:433楼 得分:5
能不能settimer,时间间隔就是你想要的
在对应的消息里让他恢复,最多就是判断一下
如果不是最小化状态就恢复,否则不做操作
发表于:2007-10-12 22:16:004楼 得分:0
谢谢,用showwindow函数解决了。


快速检索

最新资讯
热门点击