Jump to content

WinAddSwitchEntry: Difference between revisions

From EDM2
No edit summary
Ak120 (talk | contribs)
mNo edit summary
 
(One intermediate revision by one other user not shown)
Line 9: Line 9:
== Returns ==
== Returns ==
[[HSWITCH]] with values of:
[[HSWITCH]] with values of:
; The switch handle : succuss
; The switch handle : success
; [[NULLHANDLE]] : unsuccessful
; [[NULLHANDLE]] : unsuccessful
[[WinGetLastError]] could return:
[[WinGetLastError]] could return:
Line 43: Line 43:
*[[WinQuerySwitchEntry]]
*[[WinQuerySwitchEntry]]
*[[WinQuerySwitchList]]
*[[WinQuerySwitchList]]
*WinQueryWindowProcess
*[[WinQueryWindowProcess]]
*[[WinRemoveSwitchEntry]]
*[[WinRemoveSwitchEntry]]
*[[WinSwitchToProgram]]
*[[WinSwitchToProgram]]


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

Latest revision as of 14:38, 4 October 2023

Add an entry to the task list.

Syntax

WinAddSwitchEntry(switchControlStruct)

Parameters

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

Returns

HSWITCH with values of:

The switch handle
success
NULLHANDLE
unsuccessful

WinGetLastError could return:

  • PMERR_INVALID_PARAMETERS
  • PMERR_INVALID_PROCESS_ID
  • PMERR_INVALID_PROGRAM_TYPE
  • PMERR_INVALID_SESSION_ID
  • PMERR_INVALID_SWITCH_HANDLE
  • PMERR_INVALID_WINDOW
  • PMERR_NO_SPACE

Define (C/C++)

INCL_WINSWITCHLIST or INCL_WIN or INCL_LIST

Calling Convention

Cdecl32

Example Code

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

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.

Related Functions