Jump to content

WinRemoveSwitchEntry: Difference between revisions

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


=== Parameters ===
=== Parameters ===
; winListHndl - [[OS2_API:DataType:HSWITCH|HSWITCH]] - input : The task list handle which can be returned from:
; winListHndl - [[HSWITCH]] - input : The task list handle which can be returned from:
* [[OS2_API:WinAddSwitchEntry|WinAddSwitchEntry]]
* [[WinAddSwitchEntry]]
* [[OS2_API:WinCreateSwitchEntry|WinCreateSwitchEntry]]
* [[WinCreateSwitchEntry]]
* [[OS2_API:WinQuerySwitchList|WinQuerySwitchList]]
* [[WinQuerySwitchList]]
* [[OS2_API:WinQuerySwitchEntry|WinQuerySwitchEntry]]
* [[WinQuerySwitchEntry]]
 
=== Constants ===


=== Returns ===
=== Returns ===
Returns [[OS2_API:DataType:ULONG|ULONG]]:
Returns [[ULONG]]:
* 0 Successful.
* 0 Successful.
* Anything else - failure.
* Anything else - failure.
Possible results from [[OS2_API:WinGetLastError|WinGetLastError]]:
Possible results from [[WinGetLastError]]:
* [[OS2_API:PMI:error#PMERR_INVALID_SWITCH_HANDLE|PMERR_INVALID_SWITCH_HANDLE]]
* [[OS2_API:PMI:error#PMERR_INVALID_SWITCH_HANDLE|PMERR_INVALID_SWITCH_HANDLE]]
=== Module ===


=== Define (C/C++) ===
=== Define (C/C++) ===
INCL_WINSWITCHLIST or INCL_PM or INCL_WIN
INCL_WINSWITCHLIST or INCL_PM or INCL_WIN
=== Export name/Ordinal ===


=== Calling conversion ===
=== Calling conversion ===
Line 29: Line 22:


=== Example Code ===
=== Example Code ===
  [[OS2 API:DataType:HSWITCH|HSWITCH]] winListHndl;
  HSWITCH winListHndl;
  [[OS2 API:DataType:ULONG|ULONG]]    rc;
  ULONG   rc;
  ...
  ...
  rc = WinRemoveSwitchEntry(winListHndl);
  rc = WinRemoveSwitchEntry(winListHndl);
Line 36: Line 29:


=== Related Functions ===
=== Related Functions ===
[[OS2 API:WinAddSwitchEntry|WinAddSwitchEntry]] [[OS2_API:WinCreateSwitchEntry|WinCreateSwitchEntry]] [[OS2_API:WinQuerySwitchList|WinQuerySwitchList]]
*[[WinAddSwitchEntry]]
[[OS2_API:WinQuerySwitchEntry|WinQuerySwitchEntry]]
*[[WinCreateSwitchEntry]]
[[OS2_API:WinCreateStdWindow|WinCreateStdWindow]]
*[[WinQuerySwitchList]]
*[[WinQuerySwitchEntry]]
*[[WinCreateStdWindow]]


=== Notes ===
=== Notes ===
Line 45: Line 40:
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 [[OS2_API:Constant:FCF#FCF_TASKLIST|FCF_TASKLIST]] flag, you don't need to issue [[OS2_API:WinRemoveSwitchEntry|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#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.
 
=== OS Version Introduced ===
 
 
[[OS2_API | Back to OS/2 API]]
 


[[Category:The OS/2 API Project]]
[[Category:Win]]

Revision as of 19:31, 22 December 2016

WinRemoveSwitchEntry(winListHndl)
Removes the specified entry from the window task list.

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 conversion

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.