| DemoGL::Reference::Functions::DEMOGL_ParseScreenSaverCL |
SScreenSaverCLParams * DEMOGL_ParseScreenSaverCL( const LPSTR lpCmdLine );
| iSaverExecType | RunType variant to use |
| DGL_SSAVERET_UNKNOWN | RUNTYPE_UNKNOWN. |
| DGL_SSAVERET_CONFIG | RUNTYPE_SAVER_CONFIG |
| DGL_SSAVERET_NORMAL | RUNTYPE_SAVER_NORMAL |
| DGL_SSAVERET_PREVIEW | RUNTYPE_SAVER_PREVIEW |
| DGL_SSAVERET_PASSWORD | RUNTYPE_SAVER_PASSWORD |
Please note that this is only needed for screensavers. Normal applications don't need to parse the command line. DEMOGL_ParseScreenSaverCL won't report useful information if you do in normal applications.
// Declare a pointer to the screensaver command line parameter structure
SScreenSaverCLParams *pSSCLParams;
// Parse commandline for screensaver exectype
pSSCLParams=DEMOGL_ParseScreenSaverCL(lpCmdLine);
iRunType=RUNTYPE_NORMAL;
// start as a screensaver
switch(pSSCLParams->iSaverExecType)
{
case DGL_SSAVERET_CONFIG:
{
/////////////////////////
// Insert your own configwindow initialisation and start up code HERE
// If you do you shouldn't enter DEMOGL_AppRun() below but include it
// in your dialog with a button.
/////////////////////////
iRunType=RUNTYPE_SAVER_CONFIG;
}; break;
case DGL_SSAVERET_NORMAL:
{
iRunType=RUNTYPE_SAVER_NORMAL;
}; break;
case DGL_SSAVERET_PREVIEW:
{
iRunType=RUNTYPE_SAVER_PREVIEW;
}; break;
default:
{
// should not run, unknown or unsupported screensaver type.
iRunType=RUNTYPE_UNKNOWN; // will return immediately
}; break;
}
// Start the application. We won't return until the demo ends (by userinteraction or by script) or
// when a fatal error occurs.
DEMOGL_AppRun(hInstance, &sdStartupDatValues, "My title", false,0,0,iRunType);
// End it. Call this routine to signal DemoGL it's all over and it should release
// claimed resources.
DEMOGL_AppEnd();
Last changed on 20-jan-2001
©1999-2001 Solutions Design