Simon has reminded me _why_ menu identifiers were spaced every sixteen, so
authorjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
Tue, 2 Nov 2004 22:30:24 +0000 (22:30 +0000)
committerjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
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>

git-svn-id: svn://svn.tartarus.org/sgt/putty@4732 cda61777-01e9-0310-a592-d414129be87e

pageant.c
window.c

index e0def27..e0f77c3 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 cd5dda4..2486233 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