How do I create a folder in C and put my pgm in it?
/* Create our folder on the desktop */
HOBJECT hFolder, hObject;
hFolder = WinCreateObject ("wpFolder", "My Folder",
"OBJECTID=<MY_FOLDER>", "<WP_DESKTOP>",
CO_REPLACEIFEXISTS);
/* Now, put our object into the folder. */
hObject = WinCreateObject ("wpProgram", "My Online Book",
"EXENAME=VIEW.EXE;PARAMETERS=MYBOOK.INF;\
OBJECTID=<MY_BOOK>", "<MY_FOLDER>",
CO_REPLACEIFEXISTS);
What that little code snippet does is create a folder called "My Folder"
on the desktop, and puts a program object for an online book in it.
Check out the documentation on the following functions for more
information:
WinCreateObject
wpSetup (for information on the setup string parameter to WinCreateObj)
WPFolder (for information on the setup strings of folders)
WPProgram programs etc.
[Back: How do I get a list of fonts?]
[Next: How do I do it in REXX?]