xml编辑器

 

 cstring转cha型方法在mfc中用过可行

int CstringToch(CString str, char *ch)
{
	assert(ch);
	memset(ch, 0, sizeof(ch));
	int len = WideCharToMultiByte(CP_ACP, 0, str, -1, NULL, 0, NULL, NULL);
	char *ptxtTemp = new char[len + 1];
	WideCharToMultiByte(CP_ACP, 0, str, -1, ptxtTemp, len, NULL, NULL);
	/*if (len>sizeof(ch))
	{
	return 0;
	}*/
	//else
	memcpy(ch, ptxtTemp, len);
	delete[] ptxtTemp;
	return 1;
}

 

 

 

 

xml文件编辑器比较好用的 ,带有xml文件格式检查:xml notepad

posted @ 2016-09-28 10:07  xifengIB  阅读(192)  评论(0编辑  收藏  举报