NO

Author Topic: RichEdit OLE callback demo  (Read 9003 times)

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
RichEdit OLE callback demo
« on: July 05, 2013, 06:31:23 PM »
Here is simple richedit test with OLE callback for showing pictures too.
Please inform if you find errors.

EDIT: fix pointer passing
« Last Edit: July 06, 2013, 10:10:37 AM by timovjl »
May the source be with you

czerny

  • Guest
Re: RichEdit OLE callback demo
« Reply #1 on: July 05, 2013, 08:19:02 PM »
Don't know if it is a bug or a feature, that a RETURN inserts a new row.

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: RichEdit OLE callback demo
« Reply #2 on: July 05, 2013, 08:44:06 PM »
That's richedit feature.
There is still bug in pointer passing too.
May the source be with you

Offline jj2007

  • Member
  • *
  • Posts: 536
Re: RichEdit OLE callback demo
« Reply #3 on: July 06, 2013, 12:19:52 AM »
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)

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: RichEdit OLE callback demo
« Reply #4 on: July 06, 2013, 10:08:42 AM »
least missing DestroyWindow(hEdit) at exit before FreeLibrary()
May the source be with you

czerny

  • Guest
Re: RichEdit OLE callback demo
« Reply #5 on: July 06, 2013, 08:13:46 PM »
That's richedit feature.
How to enter a line break than?

Offline jj2007

  • Member
  • *
  • Posts: 536
Re: RichEdit OLE callback demo
« Reply #6 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).

However, you can see it only when you save as RTF and then reopen in a plain text editor like Notepad.

czerny

  • Guest
Re: RichEdit OLE callback demo
« Reply #7 on: July 07, 2013, 11:43:03 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.

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: RichEdit OLE callback demo
« Reply #8 on: July 07, 2013, 11:50:45 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
« Last Edit: July 07, 2013, 03:24:08 PM by timovjl »
May the source be with you

TheRaven

  • Guest
Re: RichEdit OLE callback demo
« Reply #9 on: June 09, 2017, 05:34:25 AM »
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.