This method is specific to version 3, or higher, of the OS/2 operating system.
This instance method pauses the application until the specified views are closed or the timeout value is reached.
#define INCL_WINWORKPLACE #include <os2.h> WPObject *somSelf; /* Pointer to the object on which the method is being invoked. */ LHANDLE lhView; /* Handle (hwnd or happ) of the view that must close before the application can continue. */ ULONG ulViews; /* Type of views to wait for. */ ULONG ulTimeOut; /* Time to wait for the views to close. */ BOOL bAutoClose; /* Flag indicating whether to automatically close. */ ULONG Success; /* Return value from WinWaitEventSem function. */ Success = _wpWaitForClose(somSelf, lhView, ulViews, ulTimeOut, bAutoClose);