Charly Dante
2014-02-27 12:23:29 UTC
Hi,
I have a question regarding the Scintilla Edits Control Text. I use the
UpdateUI event to perform Brace-Highlighting. To search and handle nested
Braces, I need to iterate backwards over the text of the current line. At
the moment I use this method to get the text of the edit control:
length = SendMessage(scintillaWindow, SCI_GETLENGTH, 0, 0) + 1;
const char* sciText = new const char[length];
SendMessage(AppWindows::sciEditHwnd, SCI_GETTEXT, length, (LPARAM)sciText);
I wounder if this is the preferable solution? I found in the documentation
also the SCI_GETCHARAT message, which could also be used to do this without
allocating a new array on the heap... However, is this message also suited
for iterating over text, which would mean that it is called very often in a
loop? Also I found SCI_GETCHARACTERPOINTER message in the documentation,
so...
What is the best and most efficient way to iterate over the text of the
Scintilla control?
Thanks in advance and Best Regards,
CD
I have a question regarding the Scintilla Edits Control Text. I use the
UpdateUI event to perform Brace-Highlighting. To search and handle nested
Braces, I need to iterate backwards over the text of the current line. At
the moment I use this method to get the text of the edit control:
length = SendMessage(scintillaWindow, SCI_GETLENGTH, 0, 0) + 1;
const char* sciText = new const char[length];
SendMessage(AppWindows::sciEditHwnd, SCI_GETTEXT, length, (LPARAM)sciText);
I wounder if this is the preferable solution? I found in the documentation
also the SCI_GETCHARAT message, which could also be used to do this without
allocating a new array on the heap... However, is this message also suited
for iterating over text, which would mean that it is called very often in a
loop? Also I found SCI_GETCHARACTERPOINTER message in the documentation,
so...
What is the best and most efficient way to iterate over the text of the
Scintilla control?
Thanks in advance and Best Regards,
CD
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.