wpSetWarnBeforeStart
WPProgram
This method is specific to Version 4, or higher, of the OS/2 operating system.
This instance method sets the program reference's Warn Before Start flag. If this flag is set, put up a warning dialog before starting the program.
Syntax
_wpSetWarnBeforeStart(somSelf, fWarnBeforeStart)
Parameters
- somSelf (WPProgram *) - input
- Pointer to the object on which the method is being invoked.
- Points to an object of class WPProgram.
- fWarnBeforeStart (BOOL) - input
- A warning dialog before starting the program.
Returns
- rc (BOOL) - returns
- Success indicator
- TRUE Successful completion.
- FALSE Error occurred.
How to Override
This method is not generally overridden.
Usage
This method can be called at any time to set the Warn Before Start option for a program reference object.
Example Code
#define INCL_WINWORKPLACE #include <os2.h> WPProgram *somSelf; /* Pointer to the object on which the method is being invoked. */ BOOL fWarnBeforeStart; /* A warning dialog before starting the program. */ BOOL rc; /* Success indicator */ rc = _wpSetWarnBeforeStart(somSelf, fWarnBeforeStart);
Example Code
This example requests that the user be warned before starting the current program.
_wpSetWarnBeforeStart(somSelf,TRUE);
Related Methods
- wpQueryWarnBeforeStart (WPProgram)
- wpQueryWarnBeforeStart (WPProgramFile)
WPProgramFile
This method is specific to Version 4, or higher, of the OS/2 operating system.
This instance method sets the program reference's Warn Before Start flag. If this flag is set, put up a warning dialog before starting the program.
Syntax
_wpSetWarnBeforeStart(somSelf, fWarnBeforeStart)
Parameters
- somSelf (WPProgramFile *) - input
- Pointer to the object on which the method is being invoked.
- Points to an object of class WPProgramFile.
- rc (BOOL) - returns
- Success indicator
- TRUE Successful completion.
- FALSE Error occurred.
- fWarnBeforeStart (BOOL) - input
- A warning dialog before starting the program.
Returns
- The return value is not explicitly listed in the syntax as being **fWarnBeforeStart** or **rc** in the source material, but based on common practice for setters, the success indicator is typically returned. We will prioritize the explicit parameter definitions and return type.
How to Override
This method is not generally overridden.
Usage
This method can be called at any time to set the Warn Before Start option for a program file object.
Example Code
#define INCL_WINWORKPLACE
#include <os2.h>
WPProgramFile *somSelf; /* Pointer to the object on which the method is being invoked. */
BOOL rc; /* Success indicator */
BOOL fWarnBeforeStart; /* A warning dialog before starting the program. */
fWarnBeforeStart = _wpSetWarnBeforeStart(
somSelf, rc);
Remarks
This method is not covered in the provided text.
Example Code
This example requests that the user be warned before starting the current program.
_wpSetWarnBeforeStart(somSelf,TRUE);
Related Methods
- wpQueryWarnBeforeStart (WPProgram)
- wpQueryWarnBeforeStart (WPProgramFile)