Signed-off-by: Frank Li <lznuaa@gmail.com>
if (bShowCommand)\r
{\r
CString str;\r
if (bShowCommand)\r
{\r
CString str;\r
- str+= cmdlist[i]+_T("\r\n\r\n");\r
+ str+= cmdlist[i]+_T("\n\n");\r
for(int j=0;j<str.GetLength();j++)\r
pWnd->PostMessage(MSG_PROGRESSDLG_UPDATE_UI,MSG_PROGRESSDLG_RUN,str[j]);\r
}\r
for(int j=0;j<str.GetLength();j++)\r
pWnd->PostMessage(MSG_PROGRESSDLG_UPDATE_UI,MSG_PROGRESSDLG_RUN,str[j]);\r
}\r
TRACE(_T("End Char %s \r\n"),ch==_T('\n')?_T("cr"):_T(""));\r
\r
int linenum = this->m_ctrlCmdOut.GetLineCount();\r
TRACE(_T("End Char %s \r\n"),ch==_T('\n')?_T("cr"):_T(""));\r
\r
int linenum = this->m_ctrlCmdOut.GetLineCount();\r
- int index = this->m_ctrlCmdOut.LineIndex(linenum-1);\r
- if(linenum == 0)\r
- index = 0;\r
+ int index ;\r
+ if(ch == _T('\r'))\r
+ {\r
+ index = this->m_ctrlCmdOut.LineIndex(linenum-1);\r
+ \r
+ if(linenum == 0)\r
+ index = 0;\r
+ }\r
+ else\r
+ {\r
+ index=-1;\r
+ }\r
+ \r
\r
this->m_ctrlCmdOut.SetSel(index,-1);\r
\r
\r
this->m_ctrlCmdOut.SetSel(index,-1);\r
\r
- this->m_ctrlCmdOut.ReplaceSel(m_LogText);\r
+ this->m_ctrlCmdOut.ReplaceSel(CString(_T("\n"))+m_LogText);\r
\r
this->m_ctrlCmdOut.LineScroll(linenum-1);\r
\r
\r
this->m_ctrlCmdOut.LineScroll(linenum-1);\r
\r