here i found this code

Code:
int replstrr(const char *str, const char *sch, const char *rpl, char *tgt);

int replstrr(const char *str, const char *sch, const char *rpl, char *tgt)
{
	const char *p = NULL;

	if (str == NULL || tgt == NULL) 
	{
		return(1);
	}
	for (p = str; *p; ++p) 
	{
		if (strncmp(p, sch, strlen(sch)) == 0) 
		{
			strcat(tgt, rpl);
			p += strlen(sch) - 1;

		} 
		else 
		{
			strncat(tgt, p, 1);				
		}
	}
	return(0);
}
I am calling the function as follows

Code:
char FinalFileString[99999];
			   
replstrr(pszFileText, "\n", "\r", FinalFileString);
it finds the linefeeds and replaces them with Carriage returns yet the textbox that i'm sending FinalFileString to still reads the Carriage Return as a symbol and not a an Actual Carriage Return... How do i fix this ???