]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Simon has reminded me _why_ menu identifiers were spaced every sixteen, so
authorJacob Nevins <jacobn@chiark.greenend.org.uk>
Tue, 2 Nov 2004 22:30:24 +0000 (22:30 +0000)
committerJacob Nevins <jacobn@chiark.greenend.org.uk>
Tue, 2 Nov 2004 22:30:24 +0000 (22:30 +0000)
let's add a comment so that we don't forget again. Source:
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardaccelerators/keyboardacceleratorreference/keyboardacceleratormessages/wm_syscommand.asp>

[originally from svn r4732]

pageant.c
window.c

index e0def27a839d4a2b258d66b7d9eb2970f20c2423..e0f77c3089073ba0ec28b63e1497c2e779fa0a89 100644 (file)
--- a/pageant.c
+++ b/pageant.c
  */
 #define AGENT_MAX_MSGLEN  8192
 
+/* From MSDN: In the WM_SYSCOMMAND message, the four low-order bits of
+ * wParam are used by Windows, and should be masked off, so we shouldn't
+ * attempt to store information in them. Hence all these identifiers have
+ * the low 4 bits clear. */
+
 #define IDM_CLOSE    0x0010
 #define IDM_VIEWKEYS 0x0020
 #define IDM_ADDKEY   0x0030
index cd5dda49b835c008e6d6f6293694dd6e479cf48e..248623313e35135bdfbedc66be61ebfb10996ebd 100644 (file)
--- a/window.c
+++ b/window.c
 #include <richedit.h>
 #include <mmsystem.h>
 
+/* From MSDN: In the WM_SYSCOMMAND message, the four low-order bits of
+ * wParam are used by Windows, and should be masked off, so we shouldn't
+ * attempt to store information in them. Hence all these identifiers have
+ * the low 4 bits clear. */
+
 #define IDM_SHOWLOG   0x0010
 #define IDM_NEWSESS   0x0020
 #define IDM_DUPSESS   0x0030