Creates a new screen
#include <nwconio.h>
int CreateScreen (
char *screenName,
BYTE attributes);
(IN) Points to the name of the new screen.
(IN) Specifies the screen attributes.
Returns the screen handle if successful or EFAILURE if an error occurs. If a NULL value is returned, the screen handle cannot be returned and errno is set to ENOMEM.
A new screen is created for use by the NLMâ„¢ application. The new screen is displayed and made the current screen only if no other screens exist for the NLM when this call is made; otherwise, the current and displayed screens remain unchanged.
If a screen has the DONT_AUTO_ACTIVATE attribute set, it is not automatically displayed when it is created, even if it is the only screen for the NLM.
The supported screen attributes are:
A popup screen automatically overlays the currently displayed screen. If the popup screen is still displayed when the DestroyScreen function or DropPopUpScreen (for the popup screen) function is called, the screen that was overlayed is redisplayed.
If screenName is "System Console" (case sensitive), a new screen is not created, rather the returned screen handle refers to the System Console Screen. In this case, the attributes should be set to zero. Input is not allowed from the System Console Screen. (All the input functions return EFAILURE with errno set to EWRNGKND.)
NOTE:If you pass a valid OS screen ID (usually obtained by other functions in this module) in the screenName parameter, CreateScreen creates a C Library screen handle from the given screen ID.
See scrhand.c.
DestroyScreen, DisplayScreen, GetCurrentScreen, __GetScreenID, GetScreenInfo, ScanScreens, SetCurrentScreen
#include <nwconio.h> char screenName[ ] = "NLM x New Screen"; int screenHandle; BYTE attributes = 0; screenHandle = CreateScreen(screenName, attributes);