title: CMFCPropertyGridCtrl last item not drawn?
body: <p>I have a CMFCPropertyGridCtrl that I'm using in an options dialog box.  I have a method in my options dialog class called InitPropertyGrid().  This method clears any properties and populates the CMFCPropertyGrid objects (using a custom Settings object for the property values) and appends them to the grid. </p>
  
  <p>When I open my dialog box the first time all the properties show correctly.  However, if I then close my dialog box and reopen it, the very last property is not drawn on the screen.  All other properties are drawn normally:</p>
  
  <p><strong>First time:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/9bPwT.jpg" alt="enter image description here"></p>
  
  <p><strong>All subsequent times:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/WOjKf.jpg" alt="enter image description here"></p>
  
  <p>As you can see, the plus/minus icon is showing minus in both cases to indicated the section is expanded.  When the last item is not showing, clicking on the +/- icon once to contract and once to expand causes the last item to be correctly shown.</p>
  
  <p>Note when I close the dialog box, I do not destroy it but just reshow it.  However immediately before calling ShowWindow on the dialog I call the InitPropertyGrid() (called by UpdateToCurrentSettings) method.</p>
  
  <pre><code>if(optionsDialog_ == NULL)
  {
      optionsDialog_ = new OptionsDialog(settings_, this);
      optionsDialog_-&gt;Create(OptionsDialog::IDD, this);
  }
  
  optionsDialog_-&gt;UpdateToCurrentSettings();
  optionsDialog_-&gt;ShowWindow(SW_SHOW);
  </code></pre>