Foundation > The Display System > Connecting to the Display Server
 
Connecting to the Display Server
To initialize a Rogue Wave® Views session, you have to create an instance of the IlvDisplay class. This involves:
*Opening a Connection and Checking the Display
*Closing a Connection and Ending a Session
Opening a Connection and Checking the Display
The member function isBad returns a Boolean value that tells you whether the IlvDisplay object has been successfully created. The reasons for a display failure vary from one display system to another. For an example of this, refer to Example: Add a Directory to the Display Path.
For more information about Rogue Wave Views error messages, see Appendix E, Error Messages.
Closing a Connection and Ending a Session
To close a connection to the display server, just destroy the IlvDisplay object. The destructor, IlvDisplay::~IlvDisplay, immediately frees all graphic resources used by the display.
If the IlvDisplay was created on the basis of an existing link to a display system, delete does not destroy this link. Except in the rare cases of multidisplay applications, destroying the IlvDisplay means the end of the session, since you cannot do much without a display.
You must call functions::IlvExit to end the session properly. It frees memory allocated by Rogue Wave Views. This is especially important with Microsoft Windows, where this memory is not automatically freed by the system.
delete display;
IlvExit(0);

Version 6.1
Copyright © 2016, Rogue Wave Software, Inc. All Rights Reserved.