Wrapping problem, please help.

Hi everyone.

I have a really stupid problem.

I'm using a form to create database records. This forms also contains a
richeditcontrol just to be able to underline, etc.

The problem is that when ever I want to print a record nine out of ten
times I have to reformat the richedit, because the lines are too long,
etc.

I want to be able to restrict the right margin to a number of pixels
(the number I reserved in the print) so I can see what the richedit
would look like when I print it.

When I use EM_SETRECT this is remembered by the richedit control, and
after a form resize I send the message again and everything is well,
until I reduce the size the form so it's smaller than the width I want
for the edit. Everything wraps and the format is gone.

What I really want is something like a normal wordprocessor can do, just
typing text, and when my edit is too small for the margins, the control
has to scroll to the right, until it reaches the rightmargin I've set
and then perform the wordwrap. So not wrapping at the right side of the
control.

I have been trying several Windowsmessages like EM_SETMARGINS, even
EMSETRECTNP doesn't work, while the helpfile says I can create a RECT
that's bigger than the editcontrol. Well it's not so it seems.

Is there anyone who can help me?

Is there a way to do this with the 'normal Richedit'?

--
                 Marcel
--------- thewiz+...@zonnet.nl ---------
     I charge $500 for proof-reading
                  SPAM