mguedes
asked on
Two CEditView questions...
First question:
How can i display text lines(like in devstudio debug window) in a CEditView derived window quickly and simply? code avaliable?
Second question:
How can i make a full line selection function with the SetSel member function(How can i find the starting and ending char)
Thanx in advance.
Mário Guedes
How can i display text lines(like in devstudio debug window) in a CEditView derived window quickly and simply? code avaliable?
Second question:
How can i make a full line selection function with the SetSel member function(How can i find the starting and ending char)
Thanx in advance.
Mário Guedes
ASKER
I'm very sorry if you don´t understand my first question.I want display text lines while i´m execute some operation(like in devstudio debug window). Do you no if there is anyway to "send" one line of text to my CEditview window.
Thanx anyway for your response to my second question.
Thanx anyway for your response to my second question.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank´s you for help me James. If you are any problem that i can help´s mail me.
Mário Guedes
mguedes@utad.pt
Mário Guedes
mguedes@utad.pt
I guess u want to display something like a file in the EditView.
{
CStdioFile file;
BOOL bOpenOK = file.Open( sFileName,
CFile::modeRead );
if (FALSE == bOpenOK)
{
.....
return ;
};
fileOut.ReadString( sLine );
while(fileOut.ReadString( sLine ))
{
source += sLine + "\r\n";
}
fileOut.Close();
}
In InitialUpdate of EditView, do the following,
{
GetEditCtrl().SetWindowTex
}
Second Question:
i am assuming that u know the line no., if not get the line number using,
int nLine_no = GetEditCtrl().LineFromChar
int nStartIndex = GetEditCtrl().LineIndex(nL
int nCnt = GetEditCtrl().GetLine(nLin
// Now select the whole line
GetEditCtrl().SetSel(nStar