GetScreenInfo

Returns the screen handle associated with the specified screen

Local Servers:nonblocking
Remote Servers:N/A
Classification:3.11, 3.12, 3.2, 4.x, 5.x, 6.x
Service:Screen Handling

Syntax

  #include <nwconio.h>  
   
  int GetScreenInfo  (  
     int     screenID,   
     char   *name,   
     LONG   *attrib); 
  

Parameters

screenID

(IN) Specifies a screen ID (an OS structure).

name

(OUT) Points to the name of the screen. Names of nonC Library screens are also returned (for example, MONITOR.NLM’s screen).

attrib

(OUT) Points to the attributes of a given screen ID. If there is a valid C Library screen handle associated with this screen ID, then the screen handle’s attributes are returned as well.

Return Values

This function returns the screen handle associated with the specified screen. If the screen handle is nonzero, then it can be passed to functions that take a C Library screen handle. If the function returns a NULL value, there is no C Library equivalent of the specified screen. That is, the screen was not opened by CreateScreen.

A return value of -1 indicates the screen ID was not a valid OS screen ID, and errno is set to EBADHNDL.

WARNING:An invalid screen ID is not guaranteed to return EBADHANDLE; it can also cause the server to abend.

Remarks

You can pass NULL values in any parameter.

The following are C Library settable attribute bits. These can be returned for C Library screens.

Attribute

Description

DONT_CHECK_CTRL_CHARS

Overrides the control characters (Ctrl+C, Ctrl +S) and tab processing.

AUTO_DESTROY_SCREEN

Causes the <Press any key to close> message.

POP_UP_SCREEN

Sets screen to be a popup screen.

UNCOUPLED_CURSORS

Sets distinct and separate input and output cursors.

The following attribute can be set bit if there is a related C Library screen:

The following are OS attribute bits. These cannot be set using C Library APIs.

See Also

CreateScreen, __GetScreenID, ScanScreens