Currently, the input line blinks to solve the problem.
In order to process the highlighted match, the original text is replaced directly with selectionstart and selectedtext in RT;
First, the text to be processed is processed, saved to the variable in the RTF format, and replaced with the original text position at a time. The effect is improved, but sometimes flashes because the selectionlength range is too large; when a row is changed in the middle, the original row and the new row are replaced, and the blinking is more serious.
After processing a line by line, save a line of text as an RTF variable and use the wm_setredraw (& Hb) message of sendmessage;
Disable refresh;
Sendmessage (Me. Handle, wm_setredraw, 0, 0)
Enable refresh;
Sendmessage (Me. Handle, wm_setredraw, 1, 0)
'Return to textbox <br/>'. Do not refresh. Clear all lines of text in the range. <br/> me. rt_allowrefresh (false) <br/> mybase. selectionstart = _ first <br/> mybase. selectionlength = _ length <br/> mybase. selectedtext = "" <br/> mybase. selectionlength = 0 <br/> mybase. selectionstart = _ first </P> <p> 'refresh allowed to add text of each row. <br/> me. rt_allowrefresh (true) <br/> mybase. selectedrtf = m_buff.tostring
Refreshing is prohibited when the original text is cleared. The text of the specified line of rt is deleted. However, because rt is not refreshed, it seems that the text still exists, refresh is enabled, and the text is returned, in this way, the text is updated quickly, but the RT is refreshed again, so it seems that only the text color changes.
The above refresh is allowed in the second reset insert point position, because the text will not flash before the refresh is allowed in the second reset insert point position, but the line is at the beginning, there is always a insert point cursor ("|") shadow flashing (no text input );
By now, a complete code editor is complete.
Complete source code download: http://download.csdn.net/detail/xiaoid/5088417