WideStudio Programming Guide

| WideStudio Programming Guide | WideStudio Index Table of contents

> ## How to load the stored application window directly from the program

> You can load the stored application window with following functions.

> The function for loading | Description
> WSGFloadWindow(p1,p2,p3,p4) | Loading of the stored application window
> char* p1 | Specify the store Attributes: "FILE" = from the file.
> char* p2 | Specify the store data name: if p1 = "FILE",specify the file name
> WSCbase** p3 | Specify the pointer for returned value: the loaded a window
> WSCbase* p4 | Specify the parent instance for the partial application window
> long (function returns) | WS_NO_ERR = success / the other = fail

> The following shows to load the stored application window directly from the program.

>       #include "WSCconductor.h"
>     ...

>       WSCbase* window   = NULL;             //for returned value:
>       char*    field    = "FILE";           //from FILE.
>       char*    fname    = "newpic001.oof";  //FILE name.
>       char*    path     = "/usr1/win/data"; //specify the directory.

>       //Specify the directory.
>       WSGIconductor()->setSerializePath(path);

>       //Loading of the stored application window.
>       long ret = WSGFloadWindow(field,fname,&window,NULL);
>       if (ret == WS_NO_ERR){
>         //success
>         window->setVisible(True); //display the window.
>       }

> Specify the storing attributes for the "field". The store function supports "FILE" now. In the future,it will support a RDB, an interprocess communication,a networking field, and so on...
> Specify the directory for the "path" to the conductor which controls the storing function. The default value is the current directory. Specify the file name for the "fname".and you can load the stored application window with WSGFloadWindow(). WSGFloadWindow() creates the instances when if it succeeds, so if you call it several times,it creates several instances.
> Please check the directory,the file name,the permission of the specified file,if it fails.

> ### How to load the stored partial application window directly from the program

> The following shows to load the stored partial application window.

>       #include "WSCconductor.h"
>     ...

>       WSCbase* window   = NULL;      //for returned value:
>       WSCbase* parent   = newwin000; //the parent instance for
>                                      //the partial application window.
>       char*    field    = "FILE";    //from FILE.
>       char*    fname    = "newpic001.oof";  //FILE name.
>       char*    path     = "/usr1/win/data"; //specify the directory.

>       //Specify the directory.
>       WSGIconductor()->setSerializePath(path);

>       //Loading of the stored partial application window.
>       long ret = WSGFloadWindow(field,fname,&window,parent);
>       if (ret == WS_NO_ERR){
>         //success
>         window->setVisible(True); //display the window.
>       }

> It is the same as loading the stored application window fundamentally, but it requires the parent instance in this case, for the partial application window is not a window, and needs a parent window to display. You can specify the parent windows like, WSCwindow, WSCform,WSCscrForm which has the management function of child instances.

Document Release 3.70 for WideStudio ver 3.70, Feb 2004

WideStudio documents index | Table of contents

Copyright(C) T. Hirabayashi, 2000-2004 | Last modified: Feb 25, 2004