'Support' wrote:
Here is a changed program, look it please.
Changed code was marked with “// Serge”
I see that you reset the wndproc after each “clear”.
It seems that I also have to do a reset after having removed all items in the list using the remove button.
I noticed that I don't need this reset after the list is emptied if I initialize my custom windowproc before adding items in the list in the FormCreate event.
But when I try it in my real application the behavior changes. Even if I initialize my custom windowproc at the start, I have to do resets every clear.
The behavior seem inconsistant as to why & when we're losing our custom wndproc.