I recently find that because TabCtrl::Paint calls TabCtrl::PaintTab which in turn calls IsCancelClose() etc, resulting in CancelClose gate being called at unintended times, CancelClose can no longer be use to accept user input to possibly cancel an unintended close action.
To see an example, just try to compile and run Bazzar/FileTabsExample, check the circled item and move your mouse a little bit.
A few years back, I actually make use of this gate(CancelClose) to do some useful work. I am sad it's no longer working for unknown reason.
Can @mirek or @klugier possibly take some time to look into it?
Klugier Messages: 830 Registered: September 2012 Location: Poland, Kraków
I can confirm that the bug exists. What worries me is that TabBar::IsCancelClose() method that triggers CancelClose button is triggered from some strange places like MouseMove
This functionality is important even if it is not directly used by tools like TheIDE. This is some straightforward option that should work.
I will do not have much time to fix it. Maybe Mirek would try. If you have any clues or some propositions We would be grateful for. In the long-term TabBar should find the new maintainer that will fix bugs and add new functionality.
Thank you for the quick feedback. It appears that code for TabBar has been modified since some time in or after 2016 to allow the tab cross not to be drawn if the page should not be closed. The change satisfy intended use case (a search for uppsrc actually shows 0 ocurrence of CancelClose), but will exclude other legitimate use like in my case. The code seems to be quite complicated to touch.