Thanks for your help.
If you want to use CString then you can use the Find method to find
the location of the newline character, and use this location to get
the left or right of the string.
Example:
*/
CString str1 = "This is first line.\nThis is second line.", str2;
str2 = str1.Left(str1.Find("\n"));
//str2 holds only the text "This is first line."
Instead of CString if you go for char pointer/array or string then you
can use the strtok method to parse.
Thanks,
Chary.