Programming - cpueblo.com

[MFC] RichEdit 에 색깔 글 쓰기


글쓴이 : 유광희 날짜 : 2002-05-14 (화) 10:25 조회 : 12927
CHARFORMAT	m_charformat;

void AboutDlg::RichDisplay(UINT color, CString string)
{
	m_richDisp.SetSel(-1, -1);
	m_charformat.crTextColor = color;
	m_richDisp.SetSelectionCharFormat(m_charformat);
	m_richDisp.ReplaceSel("\\n" + string);
}


// m_charformat 초기화...예
m_charformat.dwMask = CFM_COLOR | CFM_BOLD;
m_charformat.dwEffects = CFE_BOLD;
m_charformat.yHeight =  200;			// atoi for tchar

이렇게 해서 RichDisplay 를 실행하면 원하는 색깔의 볼드체를 찍을수 있다... 



유광희 2002-05-14 (화) 10:26
  칼라 값은 RGB(0, 0, 255) 값등..
댓글주소