try it, then you know it____________just do it , as love easily fade.

一次只有一个目标,步子迈小些,抑制一次实现所有功能的冲动。 过程如何结果就如何,行动是欢喜的,不管是兴奋还是沮丧的情绪都对结果无益。贵在持之以恒

导航

VC++ CEdit

CEDIT

_1, //selection

pEdit1->SetSel(0,strBuffer - m_strInput,0);

pEdit1->SetFocus(); //the selected will be highlighted

_2,   //comment filtern

strBuffer = m_strInput.SpanExcluding(";");

strComment = m_strInput.Right(m_strInput.GetLength()-strBuffer.GetLength());

m_strInput = strBuffer; 

_3,   CString to char *

l = m_strInput.GetLength();

Char * pcBuf = new char[l];

strcpy( pcBuf, (LPCTSTR)m_strInput); 

_4, when the edit window is not enough for output, scroll to the bottom make it visible

//get number of lines in edit box

i = pEdit->GetLineCount();

//scroll to bottom of box 

pEdit->LineScroll(i,0);

1,当字符串字符太长时候,用string table 资源,定义一个字符串,从而可以给edit text 赋值

m_strHelp.LoadString(IDS_HELP);

posted on 2013-08-04 16:33  吾一  阅读(303)  评论(0编辑  收藏  举报