WinFBE 1.9.8 - RichEdit

Started by SeaVipe, November 16, 2019, 08:48:20 PM

Previous topic - Next topic

SeaVipe

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.
Clive Richey

Paul Squires

So the RichEdit control is located on the frmJournal form?
Paul Squires
PlanetSquires Software

SeaVipe

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.
Clive Richey

Paul Squires

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.
Paul Squires
PlanetSquires Software

SeaVipe

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.
Clive Richey

Paul Squires

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

SeaVipe

:0)
Looking forward to the mods to ListView.
Clive Richey

Paul Squires

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.
Paul Squires
PlanetSquires Software

SeaVipe

Clive Richey

Paul Squires

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.
Paul Squires
PlanetSquires Software