hi folks
does anyone knows how to undo more than 1 time using a rich edit box ?
Posted on 2005-01-14 21:30:41 by GR33d
I believe with RichEdit 1.0 it cannot be more than 1 level, however beginning with 2.0 there are 100 undo actions by default, you have only to keep sending EM_UNDO. You can increase or decrease the number of undo levels with the EM_SETUNDOLIMIT message. With 2.0 you can no longer undo an undo,so you must send an EM_REDO message instead if you want that functionality.
Posted on 2005-01-15 00:23:01 by donkey
hum... EM_SETUNDOLIMIT its a new message to me....
i am using rich edit 2.0 and ive sended EM_SETUNDOLIMIT message with wparam = 100 and lparam = 0 (null) ...
but its still keeps undo the undo .....
what should i do ?
Posted on 2005-01-15 11:13:30 by GR33d
i got it
when i type like "this is a test" and i send the undo message to the richedit box, and it erases "this is a test" whole message..
so i am sending the message :
	invoke SendMessage,hEdit,EM_STOPGROUPTYPING,0,0

after every keydown, it would be a space key, or a line break etc...
it prevents the undo of doing a GROUP undo(a whole phrase like "this is a test") and sends to the undo queue small words ...
that should do it ...
thx again
Posted on 2005-01-15 11:59:40 by GR33d