使用user32.dll在WPF中使用MDI [英] mdi in wpf using user32.dll

查看:137
本文介绍了使用user32.dll在WPF中使用MDI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用user32.dll形成父窗口和chid窗口,并使用windowstate.minimize最小化父窗口.如果我最小化3个窗口,而我最大化第二个窗口,则意味着最小化位置的其余部分保持不变,并且1个和3个窗口按钮之间存在间隙.

i used user32.dll to form parent and chid window and by using windowstate.minimize to minimize in parent window. if i minimize 3 window and i maximized 2 nd window means the rest of minimized position remain same and there is gap inbetween 1 and 3 window button.

推荐答案

首先,如果您使用WPF,则无需考虑"user32.dll"和其他Windows特定的P/Invokes. WPF与Windows几乎没有关系,它基于DirectX几乎不使用常规Windows系统的消息.只有顶层窗口具有句柄并与Windows交互.此体系结构的详细信息非常复杂,并在此处进行了基本说明: http://msdn.microsoft.com/zh-我们/library/ms750441.aspx [ ^ ]. Microsoft引入WPF是迈出Windows的重要一步. Microsoft致力于Windows后系统的开发,但是有关此过程的信息非常有限,请参阅 http://en. wikipedia.org/wiki/Midori_%28operating_system%29 [ ^ ], http://en.wikipedia.org/wiki/Singularity_%28operating_system%29 [^ ].

现在,MDI.再次,Microsoft非常不鼓励这种有缺陷的设计,甚至最终拒绝将其包含在WPF中,但是看起来您需要它.哇!为什么?

最好使用基于TabControl的选项卡式界面,请参见 http ://msdn.microsoft.com/en-us/library/system.windows.controls.tabcontrol.aspx [ WPF中的标签MDI [
First of all, if you work with WPF, forget about "user32.dll" and other Windows-specific P/Invokes. WPF has very little to do with Windows, it is based on DirectX almost not using regular Windows system of messages. Only a top-level Window has a handle and interacts with Windows. Details of this architectures are pretty complex and basically explained here: http://msdn.microsoft.com/en-us/library/ms750441.aspx[^]. Introduction of WPF by Microsoft is a great step made to get out of Windows. Microsoft works on development of post-windows systems, but information on this process is very limited, see http://en.wikipedia.org/wiki/Midori_%28operating_system%29[^], http://en.wikipedia.org/wiki/Singularity_%28operating_system%29[^].

Now, MDI. Again, Microsoft discourages this flawed design so much and even finally denied to include it in WPF, but it looks like you need it back. Wow! Why?

You can be better of using something like tabbed interface based on TabControl, see http://msdn.microsoft.com/en-us/library/system.windows.controls.tabcontrol.aspx[^]. There are many other good designs based on docking, shrinking panels and more.

See, for example: Tabbed MDI in WPF[^].

—SA


这篇关于使用user32.dll在WPF中使用MDI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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