Jump to content

wpSwitchTo

From EDM2

This instance method is called to allow the object to give focus to the specified open view.

Syntax

_wpSwitchTo(somSelf, View)

Parameters

somSelf (WPObject *) - input
Pointer to the object on which the method is being invoked.
Points to an object of class WPObject.
View (ULONG) - input
Flag indicating the open view to which focus is to be given.
OPEN_CONTENTS Open contents view.
OPEN_DEFAULT Open default view (same as double-click).
OPEN_DETAILS Open details view.
OPEN_HELP Display HelpPanel.
OPEN_RUNNING Execute object.
OPEN_SETTINGS Open Settings notebook.
OPEN_TREE Open tree view.
OPEN_USER Class-specific views have a greater value than this.

Returns

rc (BOOL) - returns
Success indicator.
TRUE: Successful completion.
FALSE: Error occurred.

Remarks

The focus is given to the specified open view of the object if it exists. This is done by scanning the in-use list.

Usage

This method can be called at any time in order to switch to an existing view of this object.

How to Override

This method is generally not overridden.

Example Code

#define INCL_WINWORKPLACE
#include <os2.h>

WPObject      *somSelf;        /* Pointer to the object on which the method is being invoked. */
ULONG          View;           /* Flag indicating the open view to which focus is to be given. */
BOOL           rc;             /* Success indicator. */

rc = _wpSwitchTo(somSelf, View);

Related Methods