Somewhere in my app I have the statement RE.Lines.LoadFromStream(st) where RE is a TRichEdit control.
I have also set the event onResizeRequest that fires up on execution of the above statement but not every time although the event remains assigned.
The code is big and I can't cut a part of it to show it.
Can I add some command, for example RE.Perform(.....) that will force the control to execute the event (or even better not to use an event but a function that I will call whenever I want)?
It seems to be an implementation detail of rich edit control that the common controls library prevents generating
EN_REQUESTRESIZEnotification when the width or height of the control is zero.To force
EN_REQUESTRESIZEnotification, sendEM_REQUESTRESIZEmessage to rich edit control's window. This will generate the notification regardless of the control's size.CRichEditCtrlfrom MFC has a dedicated methodRequestResizefor that. To mimic that you can implement a class helper:You can then call: