PlanetSquires Forums

Support Forums => PlanetSquires Software => Topic started by: SeaVipe on November 16, 2019, 08:48:20 PM

Title: WinFBE 1.9.8 - RichEdit
Post by: SeaVipe on November 16, 2019, 08:48:20 PM
Hi Paul, placing a RichEdit control on a form will cause the app to crash when the form is closed.




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





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.
Title: Re: WinFBE 1.9.8 - RichEdit
Post by: Paul Squires on November 16, 2019, 09:18:28 PM
So the RichEdit control is located on the frmJournal form?
Title: Re: WinFBE 1.9.8 - RichEdit
Post by: SeaVipe on November 16, 2019, 09:32: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.
Title: Re: WinFBE 1.9.8 - RichEdit
Post by: Paul Squires on November 16, 2019, 09:49: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.
Title: Re: WinFBE 1.9.8 - RichEdit
Post by: SeaVipe on November 16, 2019, 09:56: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.
Title: Re: WinFBE 1.9.8 - RichEdit
Post by: Paul Squires on November 16, 2019, 10:08:18 PM
Thanks Clive - I can recreate the problem GPF. Just need to find out where it occurs when the form is being closed.
Title: Re: WinFBE 1.9.8 - RichEdit
Post by: SeaVipe on November 16, 2019, 10:14:08 PM
:0)
Looking forward to the mods to ListView.
Title: Re: WinFBE 1.9.8 - RichEdit
Post by: Paul Squires on November 16, 2019, 11:04: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.
Title: Re: WinFBE 1.9.8 - RichEdit
Post by: SeaVipe on November 16, 2019, 11:21:08 PM
Perfect! Thanks, Paul.
Title: Re: WinFBE 1.9.8 - RichEdit
Post by: Paul Squires on November 17, 2019, 07:43: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.