{"id":21,"date":"2008-11-06T17:16:11","date_gmt":"2008-11-07T01:16:11","guid":{"rendered":"http:\/\/blog.gerrior.com\/?p=21"},"modified":"2011-11-04T09:57:28","modified_gmt":"2011-11-04T17:57:28","slug":"how-to-get-setfocus-events-with-radio-buttons-in-mfc","status":"publish","type":"post","link":"https:\/\/blog.gerrior.com\/?p=21","title":{"rendered":"How to get SetFocus events with Radio Buttons in MFC"},"content":{"rendered":"<p style=\"text-align: left;\">Working in MFC today I wanted to know when the user clicked on a radio button so I could change the default button with\u00a0<tt>SetDefID(IDC_LOAD_MEMORY_BTN)<\/tt> but for some reason after adding the event handler for <tt>BN_SETFOCUS<\/tt> I never got a notification. \u00a0After poking around the radio button&#8217;s properties in Visual Studio 2008 I found\u00a0<tt>Notify<\/tt> &#8211; changing it from <tt>False<\/tt> to <tt>True<\/tt> allowed me to start receiving focus events<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Working in MFC today I wanted to know when the user clicked on a radio button so I could change the default button with\u00a0SetDefID(IDC_LOAD_MEMORY_BTN) but for some reason after adding the event handler for BN_SETFOCUS I never got a notification. \u00a0After poking around the radio button&#8217;s properties in Visual Studio 2008 I found\u00a0Notify &#8211; changing &hellip; <a href=\"https:\/\/blog.gerrior.com\/?p=21\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">How to get SetFocus events with Radio Buttons in MFC<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,6],"tags":[],"class_list":["post-21","post","type-post","status-publish","format-standard","hentry","category-mfc","category-windows"],"_links":{"self":[{"href":"https:\/\/blog.gerrior.com\/index.php?rest_route=\/wp\/v2\/posts\/21","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.gerrior.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.gerrior.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.gerrior.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.gerrior.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=21"}],"version-history":[{"count":5,"href":"https:\/\/blog.gerrior.com\/index.php?rest_route=\/wp\/v2\/posts\/21\/revisions"}],"predecessor-version":[{"id":411,"href":"https:\/\/blog.gerrior.com\/index.php?rest_route=\/wp\/v2\/posts\/21\/revisions\/411"}],"wp:attachment":[{"href":"https:\/\/blog.gerrior.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=21"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.gerrior.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=21"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.gerrior.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=21"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}