PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: WinFBE 1.9.8 - RichEdit  (Read 414 times)

SeaVipe

  • Senior Member
  • ***
  • Posts: 251
  • Windows 10
WinFBE 1.9.8 - RichEdit
« on: November 16, 2019, 08:18:20 PM »

Hi Paul, placing a RichEdit control on a form will cause the app to crash when the form is closed.


Code: [Select]

Function frmMain_btnJournal_Click( ByRef sender As wfxButton, ByRef e As EventArgs ) As LRESULT
'    frmJournal.ShowDialog
' or
frmJournal.Show
    Function = 0
End Function


Code: [Select]

Function frmJournal_btnExit_Click( ByRef sender As wfxButton, ByRef e As EventArgs ) As LRESULT
    frmJournal.close
    Function = 0
End Function


Remove the RichEdit control and the form closes without crashing the app.
Logged
Clive Richey
There is nothing government can give you that it hasn't already taken from you in the first place. Winston Churchill

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 8941
  • Windows 10
    • PlanetSquires Software
Re: WinFBE 1.9.8 - RichEdit
« Reply #1 on: November 16, 2019, 08:48:28 PM »

So the RichEdit control is located on the frmJournal form?
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

SeaVipe

  • Senior Member
  • ***
  • Posts: 251
  • Windows 10
Re: WinFBE 1.9.8 - RichEdit
« Reply #2 on: November 16, 2019, 09:02:37 PM »

Hi Paul, yes, there is a main form (frmMain) plus frmJournal with a RichEdit control. The app will crash after calling frmJournal.close (or ControlBox X). Recompile and run after removing the RichEdit control will simply close the form and return to frmMain without crashing.
I also added other forms and RichEdit controls to them with the same results. Repeatable.
Logged
Clive Richey
There is nothing government can give you that it hasn't already taken from you in the first place. Winston Churchill

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 8941
  • Windows 10
    • PlanetSquires Software
Re: WinFBE 1.9.8 - RichEdit
« Reply #3 on: November 16, 2019, 09:19:53 PM »

Thanks Clive - I am investigating now.

I have found one problem already. Code generation will fail if you add a RichEdit control but have no existing TextBox controls in your project. This is because the conditional equate for TextBox needs to be added whenever a RichEdit is used because RichEdit EXTENDS the TextBox class in the code generation. I have this fixed now.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

SeaVipe

  • Senior Member
  • ***
  • Posts: 251
  • Windows 10
Re: WinFBE 1.9.8 - RichEdit
« Reply #4 on: November 16, 2019, 09:26:12 PM »

I should have mentioned that the form also has a TextBox. However, none of the other test forms had a textbox, just frmJournal and they all exhibited the same issue regardless of the presence of a textbox.
Logged
Clive Richey
There is nothing government can give you that it hasn't already taken from you in the first place. Winston Churchill

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 8941
  • Windows 10
    • PlanetSquires Software
Re: WinFBE 1.9.8 - RichEdit
« Reply #5 on: November 16, 2019, 09:38:18 PM »

Thanks Clive - I can recreate the problem GPF. Just need to find out where it occurs when the form is being closed.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

SeaVipe

  • Senior Member
  • ***
  • Posts: 251
  • Windows 10
Re: WinFBE 1.9.8 - RichEdit
« Reply #6 on: November 16, 2019, 09:44:08 PM »

:0)
Looking forward to the mods to ListView.
Logged
Clive Richey
There is nothing government can give you that it hasn't already taken from you in the first place. Winston Churchill

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 8941
  • Windows 10
    • PlanetSquires Software
Re: WinFBE 1.9.8 - RichEdit
« Reply #7 on: November 16, 2019, 10:34:50 PM »

Looks like I needed to explicitly call DestroyWindow on each child control in order to get the subclassed WM_DESTROY to fire.

Try copying the attached WinFormsX source include files into your \inc\WinFormsX include folder for the compiler. Try your project again with the new includes and see if the GPF has now disappeared.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

SeaVipe

  • Senior Member
  • ***
  • Posts: 251
  • Windows 10
Re: WinFBE 1.9.8 - RichEdit
« Reply #8 on: November 16, 2019, 10:51:08 PM »

Perfect! Thanks, Paul.
Logged
Clive Richey
There is nothing government can give you that it hasn't already taken from you in the first place. Winston Churchill

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 8941
  • Windows 10
    • PlanetSquires Software
Re: WinFBE 1.9.8 - RichEdit
« Reply #9 on: November 17, 2019, 07:13:25 AM »

Excellent - thanks! I will test with various other WinFBE programs today to make sure that the new change does not affect anything else adversely. I hope to release a new update package today.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer