CheckIfScreenDisplayed

Checks whether a screen is active

Local Servers:blocking
Remote Servers:N/A
Classification:3.x, 4.x, 5.x, 6.x
Service:Screen Handling

Syntax

  #include <nwconio.h>  
   
  int CheckIfScreenDisplayed  (  
     int    screenHandle,   
     long   waitFlag); 
  

Parameters

screenHandle

(IN) Specifies the screen handle of the screen to check if active.

waitFlag

(IN) Specifies whether to wait for the screen to become active (displayed).

Return Values

When waitFlag = TRUE (1):

When waitFlag = FALSE (0):

If an error occurs, this function returns a value of -1 and errno is set to:

Value

Hex

Name

Description

22

(0x16)

EBADHNDL

Bad screen handle was passed in.

Remarks

The active screen is the screen currently being displayed on the server monitor.

The CheckIfScreenDisplayed function serves one of the following two purposes based on the value of the waitFlag parameter:

  • When waitFlag is TRUE, this function suspends the calling thread until the screen specified by screenHandle is active (displayed). In this case, it returns TRUE if the calling thread slept and FALSE if the calling thread did not sleep (the screen was already active).

  • When waitFlag is FALSE, this function merely checks to see if the screen specified by screenHandle is active.

Blocking Information This function is nonblocking unless waitFlag is set to TRUE.

See Also

DisplayScreen, GetCurrentScreen