CloseWindow和WM_CLOSE有什么关系 [英] What is the relationship of CloseWindow and WM_CLOSE

查看:121
本文介绍了CloseWindow和WM_CLOSE有什么关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前有点困惑:是 WM_CLOSE ::CloseWindow 以任何方式相关"还是用于完全不同的事物?

I'm a bit confused currently: Are WM_CLOSE and ::CloseWindow in any way "related" or are for completely different things?

关闭Windows的文档不要提及API函数 CloseWindow . CloseWindow应该真正被称为"MinimizeWindow"还是我遗漏的是什么?

The docs for Closing Windows don't mention the API function CloseWindow at all. Should CloseWindow be really called "MinimizeWindow" or what am I missing?

推荐答案

CloseWindowWM_CLOSE完全无关. CloseWindow函数的名称错误.鉴于其恢复窗口的功能,其反函数OpenWindow的命名也与此类似.

CloseWindow and WM_CLOSE are completely unrelated. The CloseWindow function is badly named. Its inverse function, OpenWindow is similarly badly named given that it restores windows.

我怀疑这些名称的确可以追溯到很长一段时间,可能是Windows版本1或2.我推测我们现在所说的 minimize restore 是,当时称为 close open .

I suspect these names dates back a very long way indeed, probably to Windows version 1 or 2. I'm speculating that what we now call minimize and restore were, back then, called close and open.

最小化或还原窗口的通常方法是通过SW_MINIMIZESW_RESTORE调用ShowWindow.

The usual way to minimize or restore a window is to call ShowWindow passing SW_MINIMIZE or SW_RESTORE.

我建议您忘记有关CloseWindowOpenWindow的所有信息.

I suggest that you forget all about CloseWindow and OpenWindow.

这篇关于CloseWindow和WM_CLOSE有什么关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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