title: How to properly change focus item in the ListView control?
body: <p>If I want to change the focus item in the ListView control I do the following:</p>
  
  <pre><code>BOOL setListFocusItem(CListCtrl* pList, int nIndex)
  {
      return !!pList-&gt;SetItemState(nInd, LVIS_FOCUSED, LVIS_FOCUSED);
  }
  </code></pre>
  
  <p>Is this the way you do it? </p>
  
  <p>Because the focus itself changes but there's one issue that this creates. For instance, if the list had 100 items and the focus was on item 1. If I then call my method as such <code>setListFocusItem(99);</code> the focus changes to item 99, but then if I shift-click on item 90, I would expect the list to have items 90 through 99 to be selected. But instead the list selects items 1 through 90. So obviously my <code>setListFocusItem()</code> method does not change the shift-click "first" location. So question is how to make it do it?</p>