+ case WM_TIMER:
+ processNow = (eventsToProcess & wxEVT_CATEGORY_TIMER) != 0;
+ break;
+
+ default:
+ if (msg.message < WM_USER)
+ {
+ // 0;WM_USER-1 is the range of message IDs reserved for use
+ // by the system.
+ // there are too many of these types of messages to handle
+ // them in this switch
+ processNow = (eventsToProcess & wxEVT_CATEGORY_UI) != 0;
+ }
+ else
+ {
+ // Process all the unknown messages. We must do it because
+ // failure to process some of them can be fatal, e.g. if we
+ // don't dispatch WM_APP+2 then embedded IE ActiveX
+ // controls don't work any more, see #14027. And there may
+ // be more examples like this, so dispatch all unknown
+ // messages immediately to be safe.
+ processNow = true;
+ }
+ }
+
+ // should we process this event now?
+ if ( processNow )
+ {
+ if ( !wxTheApp->Dispatch() )
+ break;
+ }
+ else
+ {
+ // remove the message and store it
+ ::GetMessage(&msg, NULL, 0, 0);
+ m_arrMSG.Add(msg);