WM_CLOSE和SC_CLOSE的区别 [英] Difference between WM_CLOSE and SC_CLOSE
问题描述
我只是想知道什么是这两个消息常数之间的差异。覆盖在的WndProc
方法哪一个我应该用,来处理关闭按钮的消息。
I just want to know what is the difference between these two messaging constants. Which one should I use in WndProc
method when overriding, to handle close button message.
推荐答案
的 WM_CLOSE
被作为每当窗口被要求关闭,以任何方式窗口消息。
WM_CLOSE
is sent as a window message whenever the window is requested to be closed, by any means.
SC_CLOSE
形式发来的的 WM_SYSCOMMAND
消息,当用户presses关闭按钮(或选择关闭从窗口的控制菜单)。
SC_CLOSE
is sent as a parameter of a WM_SYSCOMMAND
message, when the user presses the Close button (or selects Close from the control menu of the window).
哪一个你听的是哪个动作(S)确定你试图拦截/处理。
Which one you listen for is determined by which action(s) you attempting to intercept/deal with.
这篇关于WM_CLOSE和SC_CLOSE的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!