Click here to Skip to main content
15,923,689 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: contextmenu on treeviewctrl in wtl Pin
25-Sep-01 21:37
suss25-Sep-01 21:37 
GeneralPrinting of Selected Tree Nodes...... Pin
25-Sep-01 4:10
suss25-Sep-01 4:10 
GeneralRe: Printing of Selected Tree Nodes...... Pin
Tomasz Sowinski25-Sep-01 5:14
Tomasz Sowinski25-Sep-01 5:14 
GeneralSecure socket client under Win CE Pin
25-Sep-01 4:07
suss25-Sep-01 4:07 
GeneralMultiline CEdit control question Pin
25-Sep-01 3:25
suss25-Sep-01 3:25 
GeneralRe: Multiline CEdit control question Pin
Tomasz Sowinski25-Sep-01 4:03
Tomasz Sowinski25-Sep-01 4:03 
GeneralRe: Multiline CEdit control question Pin
25-Sep-01 4:19
suss25-Sep-01 4:19 
GeneralRe: Multiline CEdit control question Pin
DanYELL25-Sep-01 4:51
DanYELL25-Sep-01 4:51 
This always worked well for me:

void CEditBoxText::SetEditBoxText(CEdit* pEdit, ifstream* pDatain)
{
char buf[506];
CString strOut, tmpstr;
int iLineCount, n;

pDatain->getline(buf, 250); iLineCount = atoi(buf);

for (n=0; n<ilinecount; n++)
="" {
="" pdatain-="">getline(buf, 500); tmpstr=buf;
strOut += (n == 0 ? "" : "\r\n") + tmpstr;
}
pEdit->SetWindowText(strOut); strOut.Empty();
}

void CEditBoxText::GetEditBoxText(CEdit* pEdit, ofstream* pDataout)
{
CString csEditText, strOut, tmpstr;
int iLineLength, iLineCount, n;
LPTSTR lpTmp = NULL;

pEdit->GetWindowText(csEditText);

if (csEditText.IsEmpty())
*pDataout << 0 << "\n";

if (!csEditText.IsEmpty())
{
iLineCount = pEdit->GetLineCount();
for (n = 0; n < iLineCount; n++) // get each line, one at a time
{
lpTmp = tmpstr.GetBuffer(pEdit->LineLength(pEdit->LineIndex(n))+1);
iLineLength = pEdit->GetLine(n, lpTmp);
tmpstr.ReleaseBuffer();
tmpstr = tmpstr.Left(iLineLength);

strOut += (n == 0 ? "" : "\n") + tmpstr;
}
*pDataout << iLineCount << "\n" << strOut << "\n"; strOut.Empty();
}
}
GeneralClasses with resources Pin
Adi Shavit25-Sep-01 3:01
Adi Shavit25-Sep-01 3:01 
GeneralRe: Classes with resources Pin
Tomasz Sowinski25-Sep-01 4:01
Tomasz Sowinski25-Sep-01 4:01 
GeneralRe: Classes with resources Pin
Adi Shavit30-Sep-01 6:00
Adi Shavit30-Sep-01 6:00 
GeneralRe: Classes with resources Pin
Rashid Thadha25-Sep-01 5:46
Rashid Thadha25-Sep-01 5:46 
Questionhow to convert from device coordinates into physical coordinates Pin
pathi25-Sep-01 2:59
pathi25-Sep-01 2:59 
AnswerRe: how to convert from device coordinates into physical coordinates Pin
Tomasz Sowinski25-Sep-01 3:59
Tomasz Sowinski25-Sep-01 3:59 
GeneralCHtmlView question Pin
Nick Armstrong25-Sep-01 2:01
Nick Armstrong25-Sep-01 2:01 
GeneralRe: CHtmlView question Pin
Jon25-Sep-01 2:52
Jon25-Sep-01 2:52 
GeneralRe: CHtmlView question Pin
Nick Armstrong25-Sep-01 3:15
Nick Armstrong25-Sep-01 3:15 
QuestionConnection Points between ATL and MFC ?? Pin
Christian Graus25-Sep-01 1:57
protectorChristian Graus25-Sep-01 1:57 
AnswerRe: Connection Points between ATL and MFC ?? Pin
Michael P Butler25-Sep-01 2:32
Michael P Butler25-Sep-01 2:32 
GeneralRe: Connection Points between ATL and MFC ?? Pin
Christian Graus25-Sep-01 2:58
protectorChristian Graus25-Sep-01 2:58 
GeneralQ: Security Attributes on Files Pin
Mark Terrano25-Sep-01 1:27
Mark Terrano25-Sep-01 1:27 
GeneralRe: Q: Security Attributes on Files Pin
Tomasz Sowinski25-Sep-01 1:40
Tomasz Sowinski25-Sep-01 1:40 
GeneralRichEditCtrl Stream CString Pin
Braulio Dez25-Sep-01 0:24
Braulio Dez25-Sep-01 0:24 
GeneralSystem Idle Time Pin
AlanW24-Sep-01 23:07
AlanW24-Sep-01 23:07 
GeneralRe: System Idle Time Pin
Tomasz Sowinski24-Sep-01 23:50
Tomasz Sowinski24-Sep-01 23:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.