iczelion tut34[3]

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

本文简介:选择自 jimgreen 的 blog

	codepage is the constant that specifies the code page you want to text to be. usually, we simply use cp_acp.

text selection

we can select the text programmatically with em_setsel or em_exsetsel. either one works fine. choosing which message to use depends on the available format of the character indices. if they are already stored in a charrange structure, it's easier to use em_exsetsel.

	em_exsetsel
	wparam == not used. must be 0
	lparam == pointer to a charrange structure that contains the character range to be selected.

event notification

in the case of a multiline edit control, you have to subclass it in order to obtain the input messages such as mouse/keyboard events. richedit control provides a better scheme that will notify the parent window of such events. in order to register for notifications, the parent window sends em_seteventmask message to the richedit control, specifying which events it's interested in. em_seteventmask has the following syntax:

	em_seteventmask
	wparam == not used. must be 0
	lparam == event mask value. it can be the combination of the flags in the table below.
enm_change sends en_change notifications
enm_correcttext sends en_correcttext notifications
enm_dragdropdone sends en_dragdropdone notifications
enm_dropfiles sends en_dropfiles notifications.
enm_keyevents sends en_msgfilter notifications for keyboard events
enm_link rich edit 2.0 and later: sends en_link notifications when the mouse pointer is over text that has the cfe_link and one of several mouse actions is performed.
enm_mouseevents sends en_msgfilter notifications for mouse events
enm_objectpositions sends en_objectpositions notifications
enm_protected sends en_protected notifications
enm_requestresize sends en_requestresize notifications
enm_scroll sends en_hscroll and en_vscroll notifications
enm_scrollevents sends en_msgfilter notifications for mouse wheel events
enm_selchange sends en_selchange notifications
enm_update

sends en_update notifications.
rich edit 2.0 and later: this flag is ignored and the en_update notifications are always sent. however, if rich edit 3.0 emulates rich edit 1.0, you must use this flag to send en_update notifications

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

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

go top