MFC CRichEditCtrl 생성 및 Text 추가, Vertical Scroll을 자동으로 진행을 하려면 아래 코드를 참조.
//======== CRichEditCtrl 생성 부분 ===============
//m_rLog 생성.
CRichEditCtrl m_rLog;
//CMFCTabCtrl m_TabLog에 CRichEditCtrl 생성 (MultiLine, ReadOnly,Vertical Scroll)
m_rLog.Create(WS_CHILD | WS_VISIBLE | WS_VSCROLL | ES_MULTILINE | ES_READONLY, CRect(0,0,0,0), &m_TabLog,0);
m_rLog.Invalidate();
//======== CRichEditCtrl Text 삽입 부분 ===============
strTmp1.Format("Test.\n");
m_strLog.Insert(m_strLog.GetLength(),strTmp1.GetBuffer());
m_rLog.LineScroll(m_rLog.GetLineCount()); //Vertical Scroll을 맨 마지막 Line으로 설정.
m_rLog.SetWindowTextA(m_strLog); //m_strLog의 text를 CRichEditCtrl에 Display되도록 설정.
UpdateData(FALSE);
'공부방 > MFC' 카테고리의 다른 글
Leak Diag - 메모리 누수 탐지 프로그램 (0) | 2016.09.19 |
---|---|
timeBeginPerioid(), timeEndPeriod() Function. (0) | 2016.09.18 |
QueryPerformanceFrequency, QueryPerformanceCounter를 사용한 정밀한 시간 측정 (0) | 2014.06.02 |
String Hex 값을 DWORD로 변경 방법. (0) | 2014.05.15 |
error LNK2019 발생시 확인 사항. (0) | 2014.05.15 |