{"id":3683,"date":"2013-07-29T07:00:00","date_gmt":"2013-07-29T07:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2013\/07\/29\/a-program-for-my-nieces-the-abcs-part-4\/"},"modified":"2013-07-29T07:00:00","modified_gmt":"2013-07-29T07:00:00","slug":"a-program-for-my-nieces-the-abcs-part-4","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20130729-00\/?p=3683","title":{"rendered":"A program for my nieces: The ABCs, part 4"},"content":{"rendered":"<p>\nDisabling autorepeat in my\n<a HREF=\"http:\/\/blogs.msdn.com\/b\/oldnewthing\/archive\/2013\/07\/22\/10435765.aspx\">\nABC program<\/a>\nwas largely sufficient to keep my nieces happy,\ngiven their instructions to press only one key at a time.\nOnce in a while, though, they would hit the context menu key\nin the bottom right corner of the keyboard,\nand then they&#8217;d get stuck because they didn&#8217;t know\nhow to dismiss it.\n<\/p>\n<p>\nSo let&#8217;s disable that key outright.\n<\/p>\n<pre>\nLRESULT CALLBACK EditSubclassProc(\n    HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam,\n    UINT_PTR uIdSubclass, DWORD_PTR dwRefData)\n{\n  switch (uMsg) {\n  case WM_NCDESTROY:\n    RemoveWindowSubclass(hwnd, EditSubclassProc, uIdSubclass);\n    break;\n  case WM_CHAR:\n    if ((lParam &amp; 0x40000000) &amp;&amp; wParam != VK_BACK) return 0;\n    break;\n  <font COLOR=\"blue\">case WM_CONTEXTMENU:\n    return 0;<\/font>\n  }\n    return DefSubclassProc(hwnd, uMsg, wParam, lParam);\n}\n<\/pre>\n<p>\nWell, that was awfully anticlimactic, wasn&#8217;t it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Disabling autorepeat in my ABC program was largely sufficient to keep my nieces happy, given their instructions to press only one key at a time. Once in a while, though, they would hit the context menu key in the bottom right corner of the keyboard, and then they&#8217;d get stuck because they didn&#8217;t know how [&hellip;]<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[25],"class_list":["post-3683","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>Disabling autorepeat in my ABC program was largely sufficient to keep my nieces happy, given their instructions to press only one key at a time. Once in a while, though, they would hit the context menu key in the bottom right corner of the keyboard, and then they&#8217;d get stuck because they didn&#8217;t know how [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/3683","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=3683"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/3683\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=3683"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=3683"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=3683"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}