VioPopUp

Displays a temporary screen with a message to the user.

Syntax
VioPopUp(Options, VioHandle)

Parameters

 * Options (PULONG) - input:Option flags.
 * {|class="wikitable"

!Bit||Description
 * 31-2||Reserved. Set to 0.
 * 1||0 = Non-transparent operation. The video mode is set to a text mode. The screen is cleared, and the cursor is positioned at the upper-left corner of the screen.
 * 1||0 = Non-transparent operation. The video mode is set to a text mode. The screen is cleared, and the cursor is positioned at the upper-left corner of the screen.
 * 1||0 = Non-transparent operation. The video mode is set to a text mode. The screen is cleared, and the cursor is positioned at the upper-left corner of the screen.

1 = Transparent operation. If the video mode of the outgoing foreground session is a text mode, no mode change occurs. The screen is not cleared, and the cursor remains at its current position. If the video mode is not text, or if this session has a VioSavRedrawWait active, the pop-up is refused.

The OS/2 operating system is responsible for saving and restoring the physical display buffer of the previous foreground session around a pop-up. This is true whether transparent or nontransparent operation is selected.
 * 0||0 = Return with unique error code, ERROR_VIO_EXISTING_POPUP, if pop-up is not immediately available.
 * 0||0 = Return with unique error code, ERROR_VIO_EXISTING_POPUP, if pop-up is not immediately available.

1 = Wait if pop-up is not immediately available.
 * }
 * VioHandle (HVIO) - input: Presentation-space handle.
 * This must be 0, unless the caller is a Presentation Manager application; in this case, it must be the value returned by VioCreatePS.

Return Code

 * rc (APIRET) - returns:VioPopUp returns one of the following values:
 * 0 NO_ERROR
 * 405 ERROR_VIO_NO_POPUP
 * 406 ERROR_VIO_EXISTING_POPUP
 * 421 ERROR_VIO_INVALID_PARMS
 * 483 ERROR_VIO_TRANSPARENT_POPUP

Remarks
VioPopUp is normally issued by the application when it is running in the background and wishes to immediately display a message to the user without waiting to become the active foreground session.

When an application process issues VioPopUp, it should wait for the return from the request. If the process allows any of its threads to write to the screen before VioPopUp returns a successful return code, the screen output might be directed to the application's normal video buffer rather than to the pop-up screen. If the process allows any of its threads to issue keyboard or mouse calls before VioPopUp returns a successful return code, the input is directed from the application's normal session. Once the process that issued VioPopUp receives a successful return code, video and keyboard calls issued by any of the threads in the pop-up process are directed to the pop-up screen. This continues until the process issues VioEndPopUp. At that time, video and keyboard calls resume being directed to the application's normal video buffer.

Only one pop-up can exist at any time. If a process requests a pop-up and a pop-up already exists, the process can either wait for the prior pop-up to end or receive an immediate return with an error code. The error code indicates that the operation failed due to an existing pop-up having captured the screen.

Video pop-ups provide a mechanism for a background application to notify the operator of an abnormal event that requires the operator to take some action. When considering the suitability of using pop-ups in a particular situation, the possible disruptive effect of pop-ups to the operator should be considered. If the operator were interrupted frequently by pop-ups issued by background applications, the operator would not work effectively with the foreground application.

While a video pop-up is in the foreground, the operator cannot use the hot key to switch to another application or to the shell. Before the operator can switch to another application, or switch the shell to the foreground, the pop-up application must issue VioEndPopUp.

While a video pop-up is in effect, all video calls from the previous foreground session are blocked until the process that issued VioPopUp issues VioEndPopUp.

When VioPopUp is issued, only the process within the session that issued VioPopUp is brought to the foreground. Assuming the session was already the foreground session, any video calls issued by other processes in that session are blocked until the process that issued VioPopUp issues VioEndPopUp.

DosExecPgm cannot be issued by a process during a pop-up. The following video calls are the only calls that can be issued during the pop-up by the process that issued VioPopUp:  VioEndPopUp      VioScrollLeft VioGetConfig     VioSetCurPos VioGetCp         VioSetCurType VioGetAnsi       VioSetCp VioGetState      VioSetState VioGetCurPos     VioWrtNChar VioGetCurType    VioWrtNAttr VioGetMode       VioWrtNCell VioReadCellStr   VioWrtCharStr VioReadCharStr   VioWrtCharStrAtt VioScrollRight   VioWrtCellStr VioScrollUp      VioWrtTTY VioScrollDown  This function can be used from within a PM application. Kbdxxx, Mouxxx, and Vioxxx calls with a zero handle are all allowed between VioPopUp and VioEndPopUp and are directed to the pop-up screen.