title: MFC: member variable vs resource id of control
body: <p>I am new to vc++. I want to know which is proper and efficient way of handling controls by using member variable or resource id of controls.</p>
  
  <pre><code>m_Name.SetWindowTextW(_T("xyz"));
  or 
  SetDlgItemText(IDC_EDIT2,_T("xyz"));
  or 
  CWnd* cwd =    GetDlgItem(IDC_EDIT2);
  cwd-&gt;SetWindowTextW(_T("xyz"));
  </code></pre>