Here is simple richedit test with OLE callback for showing pictures too.
Please inform if you find errors.
EDIT: fix pointer passing
Don't know if it is a bug or a feature, that a RETURN inserts a new row.
That's richedit feature.
There is still bug in pointer passing too.
Crashes on exit at 0x74dcc3a8 (Win XP SP3).
The instruction is call [ecx+8], and ecx=0.
Program terminates normally when the call [ecx+8] is disabled (but attention, there is a push eax before).
Otherwise a great demo - thumbs up 8)
least missing DestroyWindow(hEdit) at exit before FreeLibrary()
Quote from: timovjl on July 05, 2013, 08:44:06 PM
That's richedit feature.
How to enter a line break than?
Return inserts a paragraph (aka CrLf or \par in RTF speak),
Shift Return inserts a line break (\line in RTF).
However, you can see it only when you save as RTF and then reopen in a plain text editor like Notepad.
Quote from: jj2007 on July 07, 2013, 12:20:46 AM
Return inserts a paragraph (aka CrLf or \par in RTF speak),
Shift Return inserts a line break (\line in RTF).
That's what I mean: Return should insert a line break (\par in RTF speak) but it inserts a new row.
Quote from: czerny on July 07, 2013, 11:43:03 AM
Quote from: jj2007 on July 07, 2013, 12:20:46 AM
Return inserts a paragraph (aka CrLf or \par in RTF speak),
Shift Return inserts a line break (\line in RTF).
That's what I mean: Return should insert a line break (\par in RTF speak) but it inserts a new row.
here is small test program to show rtf code too.
BTW: inside table it insert new table row and outside just new line
Technically, the rich edit control should just advance to the next line then if a character key is pressed then /par else if enter is pressed again /line. The rich edit control is poorly designed not buggy just like the text edit control for notepad has odd behaviors when strings contain certain chars like $.
That's my two non-cents ;-)
Good stuff though and good feedback.