Click here to Skip to main content
15,921,226 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Debugging multi-threaded apps in VS IDE? Pin
Jeremy Pullicino25-Sep-01 22:12
Jeremy Pullicino25-Sep-01 22:12 
Generalcontextmenu on treeviewctrl in wtl Pin
Steffen25-Sep-01 5:03
Steffen25-Sep-01 5:03 
GeneralRe: contextmenu on treeviewctrl in wtl Pin
25-Sep-01 8:12
suss25-Sep-01 8:12 
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 
I have a multiline CEdit control. The first pass through works fine. The buffer length is correct and the text that is retrieved is correct. All other passes through the loop retrieves the first buffer length, but gets the correct characters. Now, when I output that CString I have a bunch of garbage characters at the end of it. Is there any way to trim the characters off? Also, if the second line needs a larger buffer than the first line I will crash because of insufficient buffer length. The really strange thing is that each pass retrieves the correct text for the line it is on but not the correct length of the line. Any suggestions???

int LineCount = m_EditText.GetLineCount();
CString strText, strLine, TempSqlStatement;
int length = 0;
LPTSTR pBuffer;
for (int count = 0; count < LineCount; count++)
{
length = m_EditText.LineLength(count);
pBuffer = strText.GetBuffer(length);
m_EditText.GetLine(count, pBuffer);
strText.ReleaseBuffer();
strText += "\0";

strLine.Format(TEXT("%d%s\r\n")), count, (LPCTSTR) strText);
strLine.Delete(0, 1); // Need to remove the line number

// Create a temporary SQL string
TempSqlStatement += (strLine);
strText.Empty();
}
SqlStatement = TempSqlStatement;
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 
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 

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.