I just started learning wxWidgets, and I came across a group of lines of code which looks like this:
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
EVT_MENU(Minimal_About, MyFrame::OnAbout)
wxEND_EVENT_TABLE()
wxWidgets calls it "event tables". I'd like to know what kind of statement this is, because I've gone through a couple of C++ tutorials, and I've not seen anything like this. They look like function calls, but without semicolons. I know it has something to do with MACROS, but I don't really get how this works. Is this kind of statement a thing with MACROS, or it's a general thing in C++ I've not yet encountered?
You are correct. wxBEGIN_EVENT_TABLE
is an example of a "macro":
So what's a "macro"? Here's a reasonable definition:
https://gcc.gnu.org/onlinedocs/cpp/Macros.html
A macro is a fragment of code which has been given a name. Whenever the name is used, it is replaced by the contents of the macro. There are two kinds of macros. They differ mostly in what they look like when they are used. Object-like macros resemble data objects when used, function-like macros resemble function calls.
https://docs.wxwidgets.org/3.0/group__group__funcmacro__events.html#
#define wxBEGIN_EVENT_TABLE ( theClass, baseClass )
Use this macro in a source file to start listing static event handlers for a specific class.
Use wxEND_EVENT_TABLE() to terminate the event-declaration block.
"Macros" were introduced in the very earliest assembly languages. They simply do "text substitution" - modify the source code the actual compiler sees.
Macros (and the macro preprocessor) were an integral part of the original "C" language, carried forward into C++ (and many other high-level languages).
You can read more about C/C++ macros here:
https://www.programiz.com/c-programming/c-preprocessor-macros