Handles and IDs
Identifiers
All created objects are identified by an arbitrary number (which is not the object's handle, as seen below). In this manual, these Identifiers are marked as #Number (for example, each gadget created have a #Gadget number).
The numbers you assign to them do not need to be constants, but they need to be unique for each object in your program (an image can get the same number as a gadget, because these are different types of objects). These identifiers are used to later access these objects in your program.
For example, the event handling functions return these IDs:EventGadgetID() EventMenuID() EventWindowID()
Handles
All objects also get a unique number assigned to them by the system. These identifiers are called handles. Sometimes, a PureBasic function doesn't need the identifier as argument, but the handle. In this manual, such things are mentioned, also as an ID.Example:
ImageGadget(#Gadget, x, y, Width, Heigth, ImageID [, Flags]) ; #Gadget needs to be the identifier you want to assign to the Gadget ; ImageID needs to a handle to the image.To get the handle to an object, there are special functions like:WindowID() GadgetID() ImageID() MemoryID() FontID()Also, most of the functions that create these objects also return this handle as a result, if they were successful.Example:
GadgetHandle = ImageGadget(...)