두가지 형태의 출력 방법
AddString(); 무조건 맨 마지막에 항목을 추가하는 함수
InsertString(); 인덱스를 지정해서 원하는 위치에 항목을 추가한다.
/* cstrMsg.Format(_T("MsgType:%d_"), SafSpdPacket->MsgType); cstrSMsg.Format(_T("SubMsgType:%d_"), SafSpdPacket->SubMsgType); cstrCycle.Format(_T("CycCnt:%d_"), SafSpdPacket->CycCnt); cstrChDist.Format(_T("SpdCngDist:%d_"), SafSpdPacket->SpdCngDist); cstrCurSafe.Format(_T("CurSafSpd:%d_"), SafSpdPacket->CurSafSpd); cstrNxtSafe.Format(_T("NxtSafSpd:%d_"), SafSpdPacket->NxtSafSpd); cstrCRType.Format(_T("CurRdType:%d_"), SafSpdPacket->CurRdType); cstrNRType.Format(_T("NxtRdType:%d_"), SafSpdPacket->NxtRdType); //cstrRes.Format(_T("Reserved: %d"), SafSpdPacket->Reserved); */ FirstLine.Format(_T("MsgType:[%d],SubMsgType:[%d],CycCnt:[%d],SpdCngDist:[%d]"), (unsigned int)SafSpdPacket->MsgType, (unsigned int)SafSpdPacket->SubMsgType, (unsigned int)SafSpdPacket->CycCnt, (unsigned int)SafSpdPacket->SpdCngDist); SecondLine.Format(_T("CurSafSpd:[%d],NxtSafSpd:[%d],CurRdType:[%d],NxtRdType:[%d]"), (unsigned int)SafSpdPacket->CurSafSpd, (unsigned int)SafSpdPacket->NxtSafSpd, (unsigned int)SafSpdPacket->CurRdType, (unsigned int)SafSpdPacket->NxtRdType); //cstrInfo = cstrMsg + cstrSMsg + cstrCycle + cstrChDist; //cstrInfo2 = cstrCurSafe + cstrNxtSafe + cstrCRType + cstrNRType; m_MessageList = (CListBox*)GetDlgItem(IDC_LIST2); //m_MessageList->AddString(cstrInfo); //m_MessageList->AddString(cstrInfo2); m_MessageList->InsertString(0,FirstLine); m_MessageList->InsertString(1,SecondLine);
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
8 | GNU GPL | pjk | 2014.09.04 | 3932 |
7 | 개발툴 단축키[SourceInsight] | pjk | 2014.05.24 | 7247 |
6 | 파일 시스템(file system) | pjk | 2014.05.24 | 4939 |
» | List Box Control (리스트 박스 컨트롤 출력 방법) | pjk | 2014.05.24 | 5367 |
4 | RGB 256 Color | pjk | 2014.05.24 | 3218 |
3 | 개발툴 단축키[VisualStudio] | pjk | 2014.05.24 | 6845 |
2 | LSB [least significant bit], MSB [ most significant byte ] | makersweb | 2014.05.24 | 12218 |
1 | 프로그래밍 어렵지 않아요~! | makersweb | 2014.02.28 | 3672 |