The WM_ are Window Management APIs for Presentation Manager (AKA "PM") programming. You'll need to use a different set of APIs. You'll have to use one of the Dos_ APIs, perhaps DosStopSession is what you should be looking at.Looking at the text of OS/2 2.0 Control Program Programming Guide (IBM OS/2 Technical Library published by Que)", you'll see the following:
"DosStopSession can be used by a parent session to stop one or all of its child sessions. If the child session specified in the call to DosStopSession has related sessions, the related sessions are also terminated. The parent session can be running in the foreground or the background when it calls DosStopSession. If the child session is running in the foreground when it is terminated, the parent session becomes the foreground session.
DosStopSession can only be called by a parent sesion for a child session. Neither the parent session itself, nor any grandchild, nor any other other descendant session beyond a child session, nor any unrelated session, can be the target of this call."
I hope this helps. One way to look at API programming is the same as Win32 (Win16) programming. Keep coding.