Window Identifiers
Window identifiers are integers, and are used to uniquely determine window identity in the event system. In fact, identifiers do not need to be unique across your entire application, just unique within a particular context, such as a frame and its children. You may use the wxID_OK identifier, for example, on any number of dialogs as long as you don't have several within the same dialog.If you pass wxID_ANY to a window constructor, an identifier will be generated for you automatically by wxWidgets. This is useful when you don't care about the exact identifier, either because you're not going to process the events from the control being created at all, or because you process the events from all controls in one place. In this case, you should specify wxID_ANY in the event table or wxEvtHandler::Connect call as well. The generated identifiers are always negative, so they will never conflict with the user-specified identifiers, which must always be positive.wxWidgets supplies the standard identifiers listed in Table 3-1. Use the standard identifiers wherever possible: some systems can use the information to provide standard graphics (such as the OK and Cancel buttons on GTK+) or default behavior (such as responding to the Escape key by emulating a wxID_CANCEL event). On Mac OS X, wxID_ABOUT, wxID_PREFERENCES and wxID_EXIT menu items are interpreted specially and transferred to the application menu. Some wxWidgets components, such as wxTextCtrl, know how to handle menu items or buttons with identifiers such as wxID_COPY, wxID_PASTE, wxID_UNDO.