Gets a window from a Designer library
| Call | ||
| #include <vv_des.h> | ||
| WINDOWPTR dl_wnget(wnname_stp, funclistp, libp) | ||
|
UCHAR *wnname_stp |
Pointer to the name of the window to read from Designer library |
|
| FUNCLISPTR funclistp | Pointer to the function list containing installed user functions called from the window | |
| DLIBPTR libp | Pointer to open Designer library to read window from | |
| Description of Parameters
funclistp: Specify a pointer to the function list. Specify NULLP if you do not want the references to user functions or if there are no user functions. |
||
| Returns | ||
| WINDOWPTR | A pointer to the newly created window structure | |
| NULLP | Error. The global error code VV_ERR is set to one of the following: | |
| DL_LIBCOR | The specified Designer library is corrupted | |
| DL_LOCKED | The specified Designer library is locked and the window could not be read. | |
| MEMLACK | There is insufficient memory to allocate all of the structures needed for this window. All allocated memory is freed | |
| Description
dl_wnget() allocates memory for a window structure and initializes that structure based on the information read from the library about the window. A memory screen is allocated and initialized. If the window has scroll bars, the scroll bar structure is allocated and initialized. If there are background objects on the window, they are specified and memory is allocated for them. If there are no objects, the margins are set to those specified in the Designer. If Designer library locking is enabled, dl_wnget() checks whether the library is already locked. If not, and if the library is not flagged as a read-only file, this function locks the library before attempting to read the window. If dl_wnget() locked the library, it unlocks the library before returning, regardless of whether the function succeeds or fails. |
||
| Related Functions | ||
| Cautions
The Designer library must be opened with a call to dl_open() before reading the window. Always enable library locking in a multi-user system. The default is for Designer library locking to be enabled. In applications that run on a multi-user system, it is dangerous to leave libraries unlocked while windows are being read. |
||