Jump to content

WinRemoveSwitchEntry: Difference between revisions

From EDM2
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
; WinRemoveSwitchEntry(winListHndl) : Removes the specified entry from the window task list.
Removes the specified entry from the window task list.
 
==Syntax==
WinRemoveSwitchEntry(winListHndl)


=== Parameters ===
=== Parameters ===
Line 13: Line 16:
* Anything else - failure.
* Anything else - failure.
Possible results from [[WinGetLastError]]:
Possible results from [[WinGetLastError]]:
* [[OS2_API:PMI:error#PMERR_INVALID_SWITCH_HANDLE|PMERR_INVALID_SWITCH_HANDLE]]
* [[PM Error Codes#PMERR_INVALID_SWITCH_HANDLE|PMERR_INVALID_SWITCH_HANDLE]]


=== Define (C/C++) ===
=== Define (C/C++) ===
Line 40: Line 43:
You cannot remove non-OS/2 program entries since the system automatically removes them when the session expires.
You cannot remove non-OS/2 program entries since the system automatically removes them when the session expires.


If you create a standard window with [[FCF#FCF_TASKLIST|FCF_TASKLIST]] flag, you don't need to issue '''WinRemoveSwitchEntry''' to remove the text from the tasklist. When the frame window exits, it automatically removes the switch entry.
If you create a standard window with FCF_TASKLIST flag, you don't need to issue '''WinRemoveSwitchEntry''' to remove the text from the tasklist. When the frame window exits, it automatically removes the switch entry.


[[Category:Win]]
[[Category:Win]]

Latest revision as of 00:44, 20 March 2017

Removes the specified entry from the window task list.

Syntax

WinRemoveSwitchEntry(winListHndl)

Parameters

winListHndl - HSWITCH - input
The task list handle which can be returned from:

Returns

Returns ULONG:

  • 0 Successful.
  • Anything else - failure.

Possible results from WinGetLastError:

Define (C/C++)

INCL_WINSWITCHLIST or INCL_PM or INCL_WIN

Calling Convention

Cdecl32

Example Code

HSWITCH winListHndl;
ULONG   rc;
...
rc = WinRemoveSwitchEntry(winListHndl);
...

Related Functions

Notes

An application that uses the operating system effectively should add its main window to the Window List when it starts, and remove it when it from the Window List when it stops.

You cannot remove non-OS/2 program entries since the system automatically removes them when the session expires.

If you create a standard window with FCF_TASKLIST flag, you don't need to issue WinRemoveSwitchEntry to remove the text from the tasklist. When the frame window exits, it automatically removes the switch entry.