## wxActivateEvent

An activate event is sent when a window or application is being activated or deactivated.

Derived from

wxEvent
wxObject

Include files

<wx/event.h>

Event table macros

To process an activate event, use these event handler macros to direct input to a member function that takes a wxActivateEvent argument.

EVT_ACTIVATE(func) | Process a wxEVT_ACTIVATE event.
EVT_ACTIVATE_APP(func) | Process a wxEVT_ACTIVATE_APP event.
EVT_HIBERNATE(func) | Process a hibernate event, supplying the member function. This event applies to wxApp only, and only on Windows SmartPhone and PocketPC. It is generated when the system is low on memory; the application should free up as much memory as possible, and restore full working when it receives a wxEVT_ACTIVATE or wxEVT_ACTIVATE_APP event.

Remarks

A top-level window (a dialog or frame) receives an activate event when is being activated or deactivated. This is indicated visually by the title bar changing colour, and a subwindow gaining the keyboard focus.

An application is activated or deactivated when one of its frames becomes activated, or a frame becomes inactivate resulting in all application frames being inactive. (Windows only)

Please note that usually you should call event.Skip() in your handlers for these events as not doing so can result in strange effects.

See also

Event handling overview, wxApp::IsActive

Members

wxActivateEvent::wxActivateEvent
wxActivateEvent::GetActive

### wxActivateEvent::wxActivateEvent

wxActivateEvent(WXTYPE eventType = 0, bool active = true, int id = 0)

Constructor.

### wxActivateEvent::GetActive

bool GetActive() const

Returns true if the application or window is being activated, false otherwise.