Displays a window at a given positionint sm_jwindow ( char *screen_name );
- The screen to open as a window.
screen_nameuses the same format as a Panther control string that invokes a screen as a stacked or sibling window. Use a single ampersand (&) to specify a stacked window and a double ampersand (&&) to specify a sibling window. If no ampersand is included, the screen opens as a stacked window. The string can also specify viewport parameters.
For information on control string options, refer to Chapter 18, "Programming Control Strings," in Application Development Guide.
sm_jwindowdisplays a screen as a window by calling
sm_r_window. You can also call
sm_r_windowor one of its variants directly. Refer to
sm_r_windowfor information on how Panther finds the screen to display.
To display a screen as a form, use
sm_jform. To close the window programmatically, call
/* This could be a control function attached to the
* XMIT key. Here we have completed entering data
* on the second of several security screens. If
* the user entered "bypass" into the login, he
* bypasses the other security screens, and the
* "welcome" screen is displayed. If the user
* login is incorrect, the current window is
* closed, and the user is back at the initial
* screen (below). Otherwise, the next security
* window is displayed. */int getlogin(jptr)
/* check if "bypass" has been entered into
* login */
/* check if login is valid */
else if (check_password(password))
/*close current (2nd) login window */
sm_femsg(0, "Please reenter login");
sm_jclose, sm_jform, sm_window