The problem is following: I want to offer the user the possebility to switch the wordwrap-mode. But to avoid graphic problems I copy the content of the richedit control into an allocated buffer, then I destroy the control, after this I create a new one, switch the wordwrap-mode and copy the saved content to the new control. But doing it this way means to destroy the undo buffer. Is there a message existing with which you could save the undo/redo informations so that you could set them afterwards? Or could I receive anyhow a pointer to the buffer and its length?
Although Iczelion's Tutorial Series said nothing about such a function I hope there is one.

Thank you for your effort to help my finding a way out of this situation, Marwin
Posted on 2002-08-18 12:10:50 by Marwin

to be honest, I don't have an answer for you, i haven't ever used rich edit controls. However, it seems to me a bit roundabout to destroy/recreate the edit control to avoid "graphical problems". I would assume that any graphical problems could be avoided by calling InvalidateRect,hWnd,NULL,TRUE to force a redraw of the window after you switch to/from word wrapping.

Posted on 2002-08-18 12:39:28 by chorus
Well, chorus I use the wrong words. What I mean by graphic problems is following:
When I toggle the wordwrap mode sometimes a vertical scrollbar appears at the right of the control. Even if there's not enough text in the control, so that in reality no scrollbar is needed.

Posted on 2002-08-20 04:43:22 by Marwin
what about calling MoveWindow on your edit control without changing any of the dimensions? I would hope that this would send a WM_MOVE and WM_SIZE message to the window and the scroll bar would be recalculated.

Sorry, still don't have an answer for your original question :(

Posted on 2002-08-20 11:56:31 by chorus