title: MFC DDX_Radio causes debug assertion failure when DoDataExchange is called (dlgdata.cpp Line 286)
body: <p>I have a dialog with radio button with groups of 4 buttons.
  <code>DDX_Radio(pDX, D_RADIO_GROUPLEAD, intToStore)</code> in DoDataExchange is there for saving and loading.
  It works perfectly fine.</p>
  
  <p>Selection changed, DoDataExchange called, stores and loads data no problem.</p>
  
  <p>Problem occurs when I hide one of the radio button (hide it via <code>ShowWindow(SW_HIDE)</code>. Let's just call it 3rd button for reference. And previously, the selection was this 3rd button.</p>
  
  <p>I have logic that will automatically select the default one (one with Group flagged as true in the editor). I call the button's SetCheck(1).</p>
  
  <p>Visually everything seems to be working.</p>
  
  <p>However, when I click on 2nd button, then try to call DoDataExchange (hence DDX_Radio), it will causes debug assertion failure. (dlgdata.cpp Line 286)</p>
  
  <p>AND</p>
  
  <p>the data is not properly populated back in <code>intToStore</code>.</p>
  
  <p>Why could this be and how can I avoid this issue?</p>
  
  <p>Thank you.</p>