win12.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
WinChangeSwitchEntry (1.2)
Overview                                            Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINSWITCHLIST
 
USHORT WinChangeSwitchEntry(hSwitch, pswctl)
HSWITCH hSwitch;    /* handle to task-switch list                   */
PSWCNTRL pswctl;    /* address of structure with change information */
 
The WinChangeSwitchEntry function changes information in the switch list
(the list of running programs displayed by the Task Manager).
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hSwitch    Identifies the switch-list entry to change. This handle is
           returned by the WinAddSwitchEntry function.
 
pswctl     Points to the SWCNTRL structure that contains information about
           the changed switch-list entry.
 
Return Value
 
The return value is zero if the function is successful or nonzero if an
error occurs.
 
Example
 
This example changes an swctl structure (SWCNTRL) and then calls
WinChangeSwitchEntry to change the title of the application in the task
list. For this example to work, the swctl structure must have been declared
as a global and initialized prior to this call. See the example for the
WinAddSwitchEntry function to see how to set up an SWCNTRL structure.
 
strcpy(swctl.szSwtitle, "Generic: ");     /* application name */
strcat(swctl.szSwtitle, pszFileName);     /* current filename */
WinChangeSwitchEntry(hswitch, &swctl);    /* make the change  */
 
See Also
 
WinAddSwitchEntry, WinRemoveSwitchEntry, SWCNTRL