For each ModeID, the graphics library has a body of data that enables the set up of the display hardware and provides applications with information about the properties of the display mode. The display information in the database is accessed by searching it for a record with a given ModeID. For performance reasons, a look-up function named finddisplayinfo() is provided which, given a modeid, will return a handle to the internal data record about the attributes of the display. This handle is then used for queries to the display database and specification of display mode to the low-level graphics routines. It is never used as a pointer. The private data structure associated with a given ModeID is called a displayinfo. from the <graphics/displayinfo.h> include file: /* the "public" handle to a DisplayInfo */ typedef APTR DisplayInfoHandle; In order to obtain database information about an existing viewport, you must first gain reference to its 32-bit ModeID. A graphics function getvpmodeid() simplifies this operation: modeID = ULONG GetVPModeID(struct ViewPort *vp ) The vp argument is pointer to a viewport structure. this function returns the normal display ModeID, if one is currently associated with this ViewPort. If no ModeID exists this function returns INVALID_ID. Each new valid 32-bit ModeID is associated with data initialized by the graphics library at powerup. This data is accessed by obtaining a handle to it with the graphics function finddisplayinfo(). handle = DisplayInfoHandle FindDisplayInfo(ULONG modeID); Given a 32-bit ModeID key (modeID in the prototype above) finddisplayinfo() returns a handle to a valid displayinfo record found in the graphics database, or NULL. Using this handle, you can obtain information about this video mode, including its default dimensions, properties and whether it is currently available for use. For instance, you can use a displayinfohandle with the getdisplayinfodata() function to look up the properties of a mode (see below). or use the DisplayInfoHandle with videocontrol() and the vtag_normal_disp_set tag to set up a custom viewport.