title: How to handle events for dynamically created objects in MFC?
body: <p>I am wondering how I can handle an event for a dynamically created variable, e.g. a list control.</p>
  
  <pre><code>CListCtrl* pList = new CListCtrl();&lt;br/&gt;
  pList-&gt;Create(...);
  </code></pre>
  
  <p>How can I handle the event LVN_ITEMCHANGED for pList?</p>
  
  <pre><code>OnLvnItemchangedList(NMHDR *pNMHDR, LRESULT *pResult)
  {
     //do stuff
  }
  </code></pre>
  
  <p>Do I have to create an extended CListCtrl or is there some other way? I would prefer not creating a extended class.</p>