Home > Software engineering >  How do I use GetSelText to find the newline richedit content?
How do I use GetSelText to find the newline richedit content?

Time:10-17

Like (m_richctrl GetSelText ()==""), I tried" \ n "and" \ r \ n "have no, thank you!

CodePudding user response:

Newline character also can choose?
GetSelText access to the selected string, if you choose except newline and other content, the content of the this is definitely not equal

CodePudding user response:

You can use the GetDlgItemText read cstrings class object, and then using cstrings: : Find () try ~

CodePudding user response:

refer to the second floor VisualEleven response:
you can use the GetDlgItemText read cstrings class object, and then using cstrings: : Find () try ~

This method I tried before, the same character in the text, and controls in the cstrings position is different, is that you find a piece of content to be processed the index back to go out again, I checked the problem that is character width; And read into cstrings operation can not be located according to the line, more troublesome, because I am a traversal in order according to the character, so now change to find a newline to the number of lines are the same judgment, demand lower efficiency is reached but feeling

CodePudding user response:

reference 1st floor jacksonfan response:
newline can choose?
GetSelText access to the selected string, if you choose except newline and other content, the content of the this certainly is not equal to

I am a one or two characters setsel, met a newline didn't judge, who has examined the memory is a character, if choose miss if there is a reason? I'll try to you can't judge whether is equal to 0 d0a strong turn hex
  • Related