Jump to content

WinAddSwitchEntry

From EDM2
Revision as of 16:02, 3 December 2016 by Ak120 (talk | contribs) (Ak120 moved page OS2 API:PMI:WinAddSwitchEntry to WinAddSwitchEntry)

WinAddSwitchEntry

WinAddSwitchEntry(switchControlStruct)
Add an entry to the task list.

Parameters

switchControlStruct - SWCNTRL - input
The switch control data structure which contains information about the entry.

Constants

None

Returns

HSWITCH with values of:

The switch handle
succuss
NULLHANDLE
unsuccessful

WinGetLastError could return:

Define (C/C++)

INCL_WINSWITCHLIST or INCL_WIN or INCL_LIST

Calling conversion

Cdecl32

Example Code

SWCNTRL switchControlStruct;
HSWITCH rc;
...
rc = WinAddSwitchEntry(switchControlStruct);
...

Related Functions

Notes

Typically, programs add their main window's title to the task list but not the secondary windows. Programs normally specify a frame window handle as the SWCNTRL.hwnd argument.

Should you create a standard window with the FCF_TASKLIST flag you don't need to call WinAddSwitchEntry to add the text to the task list. WinCreateStdWindow updates the title bar text along with the task list text. The frame will retain the FCF_TASKLIST flag through the style FS_TASKLIST with your call WinSetWindowText on the frame window handle, which changes both the standard window title bar text and the task list text.