{"id":1155,"date":"2014-03-10T10:19:02","date_gmt":"2014-03-10T02:19:02","guid":{"rendered":"http:\/\/blog.dayandcarrot.net\/?p=1155"},"modified":"2014-03-10T10:19:02","modified_gmt":"2014-03-10T02:19:02","slug":"mfc%e5%bc%80%e5%90%af%e5%85%b3%e9%97%ad%e6%95%b0%e5%ad%97%e9%94%ae%e7%9b%98%ef%bc%88%e5%b0%8f%e9%94%ae%e7%9b%98%ef%bc%89","status":"publish","type":"post","link":"https:\/\/dayandcarrot.space\/?p=1155","title":{"rendered":"MFC\u5f00\u542f\/\u5173\u95ed\u6570\u5b57\u952e\u76d8\uff08\u5c0f\u952e\u76d8\uff09"},"content":{"rendered":"<p>\u5475\u5475\u5475\u5475\uff0c\u5e2e\u522b\u4eba\u6539\u7a0b\u5e8f\uff0c\u7136\u540e\u81ea\u5df1\u7684x230\u6ca1\u6709\u627e\u5230\u4efb\u4f55\u5f00\u542f\/\u5173\u95ed\u5c0f\u952e\u76d8\u7684\u65b9\u6cd5\u3002MFC\u7a0b\u5e8f\u8fd0\u884c\u53d1\u73b0\u5c0f\u952e\u76d8\u9ed8\u8ba4\u5f00\u542f\u7684\uff0c\u5bfc\u81f4\u6211+-\u53f7\u952e\u7528\u4e0d\u6765\u3002<\/p>\n<pre class=\"lang:c++ decode:true  crayon-selected\">\/\/ Set NUMLOCK Status.\nvoid SetNumLock( BOOL bState )\n{\n    BYTE keyState[256];\n    GetKeyboardState((LPBYTE)&amp;keyState);\n    if( (bState &amp;&amp; !(keyState[VK_NUMLOCK] &amp; 1)) ||\n        (!bState &amp;&amp; (keyState[VK_NUMLOCK] &amp; 1)) )\n    {\n        \/\/ Simulate a key press\n        keybd_event( VK_NUMLOCK,\n                     0x45,\n                     KEYEVENTF_EXTENDEDKEY | 0,\n                     0 );\n        \/\/ Simulate a key release\n        keybd_event( VK_NUMLOCK,\n                     0x45,\n                     KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP,\n                     0);\n    }\n}<\/pre>\n<p>\u6765\u81ea<a href=\"http:\/\/weseetips.com\/tag\/enable-numlock\/\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/weseetips.com\/tag\/enable-numlock\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5475\u5475\u5475\u5475\uff0c\u5e2e\u522b\u4eba\u6539\u7a0b\u5e8f\uff0c\u7136\u540e\u81ea\u5df1\u7684x230\u6ca1\u6709\u627e\u5230\u4efb\u4f55\u5f00\u542f\/\u5173\u95ed\u5c0f\u952e\u76d8\u7684\u65b9\u6cd5\u3002MFC\u7a0b\u5e8f\u8fd0\u884c\u53d1\u73b0\u5c0f\u952e\u76d8\u9ed8\u8ba4\u5f00\u542f\u7684\uff0c\u5bfc\u81f4\u6211+-\u53f7\u952e\u7528\u4e0d\u6765\u3002 \/\/ Set NUMLOCK Status. void SetNumLock( BOOL bState ) { BYTE keyState[256]; GetKeyboardState((LPBYTE)&amp;keyState); if( (bState &amp;&amp; !(keyState[VK_NUMLOCK] &amp; 1)) || (!bState &amp;&amp; (keyState[VK_NUMLOCK] &amp; 1)) ) { \/\/ Simulate a key press keybd_event( VK_NUMLOCK, 0x45, KEYEVENTF_EXTENDEDKEY | 0, 0 ); \/\/ Simulate a key release keybd_event( VK_NUMLOCK, 0x45, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0); } } [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[73],"class_list":["post-1155","post","type-post","status-publish","format-standard","hentry","category-study","tag-mfc"],"_links":{"self":[{"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=\/wp\/v2\/posts\/1155","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1155"}],"version-history":[{"count":0,"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=\/wp\/v2\/posts\/1155\/revisions"}],"wp:attachment":[{"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1155"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1155"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1155"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}