I'm thinking about this problem, I would like to be able to compose these fancy html-mails.
I use a rich-edit control for mail-input. So far I didn't implement any choose font, colors etc, but I guess when i do,
it will be pointless unless I can format the mail as html. :)

I thought of two ways of doing it.

1> learn about the rtf-format, save the richedits contents to rtf-file and parse the contents.
But this seems so hard, I had a look at the documentations, and it seems rather too complex for me, especially if I gonna do the reverse
in the future, convert a html-mail to a rtf-file ( *the horror* :eek: )

2> Perhaps better (but dont know if possible) Somehow parse the contents of the richedit box, when gonna send the mail, and for each character, check if there is any change in formatting, font, color etc, and update the html-mail with the proper tags. Will I have to 'select' one character at a time in the editbox with sendmessage to do this? ( got the idea I had to do like that when browsing the helpfile on richedit ).
This would be easier, both richedit->html and reverse I'm imagining.

What would your approach be?
Posted on 2003-04-29 13:40:57 by david
Perhaps using a HTML control? There's been one bundled with windows for a long time (hint: internet explorer). Downside is you might be opening yourself to exploits and whatnot.

Or you could code as stripped-down html control... still quite some work, but if done right, you can get something solid, fast, and free of exploitable bugs. Probably more work than parsing between html and richedit though.
Posted on 2003-04-29 14:25:27 by f0dder
Yes... I would like as little work as possible :tongue: I read a little bit about this browser control on msdn, it had like the internet-explorer buttons and stuff and I had to remove it and all, it seemed rather too complex, and also I thought I would have more control if doing it myself somehow.
I would only like to have html like like font, fontsize, color, bold/italic/underline, and maybe center/left/right align.
That's still much work for me.
Posted on 2003-04-29 15:17:27 by david