It seems it is not possible to intercept an iconization event *before* the actual iconization occurs [1].

Alternative solutions would be:

1. See whether iconizing the main frame would not affect the click window
2. Remove the minimization box and add a specific button in the toolbar

[1] http://forums.wxwidgets.org/viewtopic.php?t=22858&p=97862