WM_NCLBUTTONDOWN Notification-------------------------------------------------------------------------------- The WM_NCLBUTTONDOWN message is posted when the user presses the left mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.A window receives this message through its WindowProc function. SyntaxWM_NCLBUTTONDOWN WPARAM wParam LPARAM lParam;
ParameterswParam Specifies the hit-test value returned by the DefWindowProc function as a result of processing the WM_NCHITTEST message. For a list of hit-test values, see WM_NCHITTEST. lParam Specifies a POINTS structure that contains the x- and y-coordinates of the cursor. The coordinates are relative to the upper-left corner of the screen. WM_NCLBUTTONUP Notification-------------------------------------------------------------------------------- The WM_NCLBUTTONUP message is posted when the user releases the left mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.A window receives this message through its WindowProc function. SyntaxWM_NCLBUTTONUP WPARAM wParam LPARAM lParam;
ParameterswParam Specifies the hit-test value returned by the DefWindowProc function as a result of processing the WM_NCHITTEST message. For a list of hit-test values, see WM_NCHITTEST. lParam Specifies a POINTS structure that contains the x- and y-coordinates of the cursor. The coordinates are relative to the upper-left corner of the screen. WM_KEYDOWN Notification--------------------------------------------------------------------------------The WM_KEYDOWN message is posted to the window with the keyboard focus when a nonsystem key is pressed. A nonsystem key is a key that is pressed when the ALT key is not pressed. SyntaxWM_KEYDOWN WPARAM wParam LPARAM lParam;
ParameterswParam Specifies the virtual-key code of the nonsystem key. lParam Specifies the repeat count, scan code, extended-key flag, context code, previous key-state flag, and transition-state flag, as shown in the following table. 0-15 Specifies the repeat count for the current message. The value is the number of times the keystroke is autorepeated as a result of the user holding down the key. If the keystroke is held long enough, multiple messages are sent. However, the repeat count is not cumulative. 16-23 Specifies the scan code. The value depends on the OEM. 24 Specifies whether the key is an extended key, such as the right-hand ALT and CTRL keys that appear on an enhanced 101- or 102-key keyboard. The value is 1 if it is an extended key; otherwise, it is 0. 25-28 Reserved; do not use. 29 Specifies the context code. The value is always 0 for a WM_KEYDOWN message. 30 Specifies the previous key state. The value is 1 if the key is down before the message is sent, or it is zero if the key is up. 31 Specifies the transition state. The value is always zero for a WM_KEYDOWN message.练习查查msdn!
如果msdn看不懂,有中文的。
如果还看不懂,则我们也没办法。
问题1:
当鼠标点击一下, lParam,wParam分别被存了着什么?
问题2:
按下键盘A后: lParam,wParam分别被存了着什么?
问题3:
按住Shift的同时按住A后: lParam,wParam分别被存了着什么?
问题4:
按住Shift与ctrl的同时按住Delete键后: lParam,wParam分别被存了着什么?
The WM_NCLBUTTONDOWN message is posted when the user presses the left mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.A window receives this message through its WindowProc function.
SyntaxWM_NCLBUTTONDOWN WPARAM wParam
LPARAM lParam;
ParameterswParam
Specifies the hit-test value returned by the DefWindowProc function as a result of processing the WM_NCHITTEST message. For a list of hit-test values, see WM_NCHITTEST.
lParam
Specifies a POINTS structure that contains the x- and y-coordinates of the cursor. The coordinates are relative to the upper-left corner of the screen. WM_NCLBUTTONUP Notification--------------------------------------------------------------------------------
The WM_NCLBUTTONUP message is posted when the user releases the left mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.A window receives this message through its WindowProc function.
SyntaxWM_NCLBUTTONUP WPARAM wParam
LPARAM lParam;
ParameterswParam
Specifies the hit-test value returned by the DefWindowProc function as a result of processing the WM_NCHITTEST message. For a list of hit-test values, see WM_NCHITTEST.
lParam
Specifies a POINTS structure that contains the x- and y-coordinates of the cursor. The coordinates are relative to the upper-left corner of the screen. WM_KEYDOWN Notification--------------------------------------------------------------------------------The WM_KEYDOWN message is posted to the window with the keyboard focus when a nonsystem key is pressed. A nonsystem key is a key that is pressed when the ALT key is not pressed. SyntaxWM_KEYDOWN WPARAM wParam
LPARAM lParam;
ParameterswParam
Specifies the virtual-key code of the nonsystem key.
lParam
Specifies the repeat count, scan code, extended-key flag, context code, previous key-state flag, and transition-state flag, as shown in the following table.
0-15
Specifies the repeat count for the current message. The value is the number of times the keystroke is autorepeated as a result of the user holding down the key. If the keystroke is held long enough, multiple messages are sent. However, the repeat count is not cumulative.
16-23
Specifies the scan code. The value depends on the OEM.
24
Specifies whether the key is an extended key, such as the right-hand ALT and CTRL keys that appear on an enhanced 101- or 102-key keyboard. The value is 1 if it is an extended key; otherwise, it is 0.
25-28
Reserved; do not use.
29
Specifies the context code. The value is always 0 for a WM_KEYDOWN message.
30
Specifies the previous key state. The value is 1 if the key is down before the message is sent, or it is zero if the key is up.
31
Specifies the transition state. The value is always zero for a WM_KEYDOWN message.练习查查msdn!
我想说的是只要在此提问的,应该都是查过 MSDN、Google过的,实在无法解决问题才到此想得到一个正确的答案。如上回答等于白说。
既然问了这个问题,那说明没查,或者查了没看懂
大家建议去看MSDN有什么错,如果没看懂,那就查词典
查词典也不行,拿出英文句子来找人翻译