RichEdit OLE callback demo

Started by TimoVJL, July 05, 2013, 06:31:23 PM

Previous topic - Next topic

TimoVJL

Here is simple richedit test with OLE callback for showing pictures too.
Please inform if you find errors.

EDIT: fix pointer passing
May the source be with you

czerny

Don't know if it is a bug or a feature, that a RETURN inserts a new row.

TimoVJL

That's richedit feature.
There is still bug in pointer passing too.
May the source be with you

jj2007

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)

TimoVJL

least missing DestroyWindow(hEdit) at exit before FreeLibrary()
May the source be with you

czerny


jj2007

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.

czerny

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.

TimoVJL

#8
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
May the source be with you

TheRaven

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.