Click here to Skip to main content
14,698,579 members
Home » Discussions » C / C++ / MFC
   

C / C++ / MFC

 
QuestionEnsuring code runs synchronously Pin
ForNow9-Mar-16 5:01
MemberForNow9-Mar-16 5:01 
AnswerRe: Ensuring code runs synchronously Pin
Richard MacCutchan9-Mar-16 7:21
mveRichard MacCutchan9-Mar-16 7:21 
AnswerRe: Ensuring code runs synchronously Pin
Bram van Kampen9-Mar-16 15:29
MemberBram van Kampen9-Mar-16 15:29 
AnswerRe: Ensuring code runs synchronously Pin
Bram van Kampen9-Mar-16 16:04
MemberBram van Kampen9-Mar-16 16:04 
QuestionNon display characters for selection count Pin
ForNow8-Mar-16 20:44
MemberForNow8-Mar-16 20:44 
AnswerRe: Non display characters for selection count Pin
Richard MacCutchan8-Mar-16 22:45
mveRichard MacCutchan8-Mar-16 22:45 
GeneralRe: Non display characters for selection count Pin
ForNow9-Mar-16 4:55
MemberForNow9-Mar-16 4:55 
GeneralRe: Non display characters for selection count Pin
David Crow9-Mar-16 5:24
MemberDavid Crow9-Mar-16 5:24 
Really? I just tested (using VS2008) and it came out as two separate characters. Here's the code I used:

// the control contained the text: David\r\n

void CMyDialog::OnClickedOk()
{
    int len = m_richedit.GetWindowTextLength();
    TRACE(_T("Len = %d\n"), len);

    CString text;
    m_richedit.GetWindowText(text);
    TRACE(_T("Text = %s\n"), text);

    for (int x = 0; x < len; x++)
        TRACE(_T("%#x\n"), text[x]);
}
The resulting output looked like:

Len = 7
Text = David

0x44
0x61
0x76
0x69
0x64
0xd
0xa

"One man's wage rise is another man's price increase." - Harold Wilson

"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles


GeneralRe: Non display characters for selection count Pin
ForNow9-Mar-16 5:32
MemberForNow9-Mar-16 5:32 
QuestionRe: Non display characters for selection count Pin
David Crow9-Mar-16 5:49
MemberDavid Crow9-Mar-16 5:49 
AnswerRe: Non display characters for selection count Pin
ForNow9-Mar-16 5:58
MemberForNow9-Mar-16 5:58 
QuestionRe: Non display characters for selection count Pin
David Crow9-Mar-16 6:03
MemberDavid Crow9-Mar-16 6:03 
AnswerRe: Non display characters for selection count Pin
ForNow9-Mar-16 6:20
MemberForNow9-Mar-16 6:20 
GeneralRe: Non display characters for selection count Pin
David Crow9-Mar-16 6:40
MemberDavid Crow9-Mar-16 6:40 
GeneralRe: Non display characters for selection count Pin
ForNow9-Mar-16 6:45
MemberForNow9-Mar-16 6:45 
QuestionRe: Non display characters for selection count Pin
David Crow9-Mar-16 6:53
MemberDavid Crow9-Mar-16 6:53 
AnswerRe: Non display characters for selection count Pin
ForNow9-Mar-16 7:21
MemberForNow9-Mar-16 7:21 
GeneralRe: Non display characters for selection count Pin
Richard MacCutchan9-Mar-16 7:18
mveRichard MacCutchan9-Mar-16 7:18 
GeneralRe: Non display characters for selection count Pin
Bram van Kampen9-Mar-16 15:52
MemberBram van Kampen9-Mar-16 15:52 
GeneralRe: Non display characters for selection count Pin
Richard MacCutchan9-Mar-16 23:11
mveRichard MacCutchan9-Mar-16 23:11 
GeneralRe: Non display characters for selection count Pin
Bram van Kampen9-Mar-16 15:49
MemberBram van Kampen9-Mar-16 15:49 
GeneralRe: Non display characters for selection count Pin
Richard MacCutchan9-Mar-16 23:11
mveRichard MacCutchan9-Mar-16 23:11 
GeneralRe: Non display characters for selection count Pin
Bram van Kampen10-Mar-16 15:19
MemberBram van Kampen10-Mar-16 15:19 
QuestionRe: Non display characters for selection count Pin
David Crow10-Mar-16 3:48
MemberDavid Crow10-Mar-16 3:48 
AnswerRe: Non display characters for selection count Pin
leon de boer15-Mar-16 21:22
Memberleon de boer15-Mar-16 21:22 

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.