1、#include <Richedit.h>
2、 LoadLibrary( "riched32.dll" );
3、 CHARFORMAT cf;
ZeroMemory( &cf , sizeof(cf));
cf.cbSize = sizeof(cf);
cf.dwMask = CFM_COLOR ; //通过设定标签,激活不同设定,此项设定颜色
cf.crTextColor =RGB(0,0,255) ; //颜色为蓝色
SendMessage(hwndEdit , EM_SETCHARFORMAT , SCF_ALL , (LPARAM)&cf); //发送设定的消息 ,