Version: 3.2.5
Standard Event Identifiers

wxWidgets defines a special identifier value wxID_ANY which is used in the following two situations:

  • when creating a new window you may specify wxID_ANY to let wxWidgets assign an unused identifier to it automatically
  • when installing an event handler using wxEvtHandler::Bind, wxEvtHandler::Connect or the event table macros, you may use it to indicate that you want to handle the events coming from any control, regardless of its identifier

Another standard special identifier value is wxID_NONE: this is a value which is not matched by any other id.

wxWidgets also defines a few standard command identifiers which may be used by the user code and also are sometimes used by wxWidgets itself. These reserved identifiers are all in the range between wxID_LOWEST and wxID_HIGHEST and, accordingly, the user code should avoid defining its own constants in this range (e.g. by using wxID_ANY and retrieving the control's id after it was created).

Refer to the list of stock items for the subset of standard IDs which are stock IDs as well.