title: How to convert CEdit type of data in to CString type data and how to display that in a messagebox?
body: <p>I would like to know how the data from CEdit(Entered by user) is displayed on Message box.</p>
  
  <p>I would like to accept input from user and need to display it in a messagebox.Simple but i'm not able to convert CEdit type(input by user) to CString type(Which i have to display in Messagebox).</p>
  
  <p>Here is my Code Snippet</p>
  
  <pre><code>In .h file
      CEdit* pEdit = new CEdit;
      CString text;
  
  In .cpp file
      pEdit.Create(WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER,
                  CRect(150, 10, 500, 50), this, 1);
      pEdit.GetWindowText(text);
  </code></pre>