title: How to add items to a List Control in an MFC dialog
body: <p>In order to have a table like:  </p>
  
  <p><img src="https://i.stack.imgur.com/AXjNm.jpg" alt="enter image description here"><br>
  in my MFC dialog, I have added a <code>List Control</code> to it. 
  And then with <code>Add Variable</code> wizard, I have created this variable for the control:  </p>
  
  <pre><code>public:
  CListCtrl m_lstIDC_LIST1Control;  
  </code></pre>
  
  <p>and then in the <code>OnInitDialog</code> function of my dialog, I have added these lines of code:  </p>
  
  <pre><code>// TODO: Add extra initialization here
  m_lstIDC_LIST1Control.SetExtendedStyle(LVS_EX_FULLROWSELECT);
  m_lstIDC_LIST1Control.SetExtendedStyle(LVS_EX_GRIDLINES);
  //m_lstIDC_LIST1Control.SetExtendedStyle( LVS_SHOWSELALWAYS);
  LVITEM lvItem;
  
  lvItem.mask = LVIF_TEXT;
  lvItem.iItem = 0;
  lvItem.iSubItem = 0;
  char* text = "Sandra C. Anschwitz";
  wchar_t wtext[50];
  mbstowcs(wtext, text, strlen(text)+1);
  LPWSTR ptr = wtext;
  lvItem.pszText = ptr;
  m_lstIDC_LIST1Control.InsertItem(&amp;lvItem);
  UpdateData(false);  
  </code></pre>
  
  <p>the result that I get is:  </p>
  
  <p><img src="https://i.stack.imgur.com/5ZHhL.jpg" alt="enter image description here"><br>
  and if I uncomment the line:  </p>
  
  <pre><code>//m_lstIDC_LIST1Control.SetExtendedStyle( LVS_SHOWSELALWAYS);  
  </code></pre>
  
  <p>the horizontal grids will not be shown either!<br>
  So what's the problem?<br>
  Why the item that I have added is not shown?
  what should I do in order to create a table like the one shown in the first picture?</p>