Referencing an Object Using OBJECTID

HOBJECT hObject;                                /* Object handle         */

/*************************************************************************/
/* Create a folder on the desktop with an OBJECTID of MYFOLDER           */
/*************************************************************************/

hObject = WinCreateObject("WPFolder",           /* Class Name            */
                          "My Folder",          /* Title                 */
                          "OBJECTID=<MYFOLDER>", /* Setup string         */
                          "<WP_DESKTOP>",       /* Location              */
                          CO_REPLACEIFEXISTS);  /* Create option         */

/*************************************************************************/
/* Create a file object with an OBJECTID of MYFILE inside the folder     */
/*************************************************************************/

hObject = WinCreateObject("WPDataFile",         /* Class Name            */
                          "My File",            /* Title                 */
                          "OBJECTID=<MYFILE>",  /* Setup string          */
                          "<MYFOLDER>",         /* Location              */
                          CO_REPLACEIFEXISTS);  /* Create option         */

/*************************************************************************/
/* Create a shadow of the file object MYFILE on the desktop              */
/*************************************************************************/

hObject = WinCreateObject("WPShadow",           /* Class Name            */
                          "My File",            /* Title                 */
                          "SHADOWID=<MYFILE>",  /* Setup string          */
                          "<WP_DESKTOP>",       /* Location              */
                          CO_REPLACEIFEXISTS);  /* Create option         */


[Back: Workplace Shell Application Structure]
[Next: Drag Initiation From a Container Window]