iczelion tut34[1]

[入库:2005年8月19日] [更新:2007年3月24日]

本文简介:选择自 jimgreen 的 blog

tutorial 34: richedit control: more text operations

you'll learn more about text operations under richedit control. specifically, you'll know how to search for/replace text, jumping to specific line number.

download the example.

theory

searching for text

there are several text operations under richedit control. searching for text is one such operation. searching for text is done by sending em_findtext or em_findtextex. these messages has a small difference.

em_findtext
wparam == search options. can be any combination of the values in the table below.these options are identical for both 
			em_findtext and em_findtextex
fr_down if this flag is specified, the search starts from the end of the current selection to the end of the text in the control (downward). this flag has effect only for richedit 2.0 or later: this behavior is the default for richedit 1.0. the default behavior of richedit 2.0 or later is to search from the end of the current selection to the beginning of the text (upward).
in summary, if you use richedit 1.0, you can't do anything about the search direction: it always searches downward. if you use richedit 2.0 and you want to search downward, you must specify this flag else the search would be upward.
fr_matchcase if this flag is specified, the search is case-sensitive.
fr_wholeword if this flag is set, the search finds the whole word that matches the specified search string.

本文关键:iczelion asm
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top