GUI Elements as objects
GUI programming fits very nicely in the object-oriented methodology.
Every type of thing that can be displayed on the screen is a class. Example: for the wxFrame class for windows.
If we need a specialiced version, we can subclass the default class for our own behavior. For example: MyFrame in the example. Could also be DocumentWindow, SettingsWindows, GameFrame, etc.
The actual item displayed on screen is an instance of that class. For some types of windows, there will be only one instance (example: preferences), for some, there wil be multiple instances (example: multiple browser windows).