Program Manager has a DDE command-string interface that allows other applications to create, display, delete and reload groups; add items to groups; replace items in groups; delete items from groups; and to close Program Manager. The following commands perform these actions:
AddItem CreateGroup DeleteGroup DeleteItem (Windows version 3.1 only) | ExitProgman Reload (Windows 3.1 only) ReplaceItem (Windows 3.1 only) ShowGroup |
The setup program for an application can use these commands, for example, to instruct Program Manager to install the application's icon in a group.
Multiple commands may be concatenated; each command must be contained in square brackets, and parameters must be contained in parentheses and separated by commas. Quotation marks must be used to delimit arguments that contain spaces, brackets, or parentheses. For example, the following set of commands adds WINAPP.EXE to the Windows Applications group:
[CreateGroup(Windows Applications)]
[ShowGroup(1)]
[AddItem(winapp.exe,Win App,winapp.exe,2)]
To use these commands, an application must first initiate a conversation with
Program Manager. The application and topic names for the conversation are both
PROGMAN. Then the application sends the WM_DDE_EXECUTE message, specifying the appropriate command and its parameters.
Note:
The user can configure Windows to use a shell other than Program Manager as the default. As a result, you should not design an application assuming that Program Manager will be available for a DDE conversation.
The following sections describe Program Manager DDE command strings in detail. In the syntax blocks in the following sections, brackets enclose optional arguments.