Jump to content

WinChangeSwitchEntry: Difference between revisions

From EDM2
Ak120 (talk | contribs)
mNo edit summary
Line 1: Line 1:
== WinChangeSwitchEntry ==
;WinChangeSwitchEntry(switchHndl, switchControlStruct) : Modifies the specified entry in the task list.
; WinChangeSwitchEntry(switchHndl, switchControlStruct) : Modifies the specified entry in the task list.


=== Parameters ===
=== Parameters ===
; switchHndl - [[OS2 API:DataType:HSWITCH|HSWITCH]] - input : The task list switch handle.
;switchHndl - [[HSWITCH]] - input : The task list switch handle.
; switchControlStruct - [[OS2 API:DataType:SWCNTRL|SWCNTRL]] - input : Switch control data.
;switchControlStruct - [[SWCNTRL]] - input : Switch control data.


=== Constants ===
None


=== Returns ===
=== Returns ===
[[OS2 API:DataType:ULONG|ULONG]] with values of:
[[ULONG]] with values of:
; Zero : success
; Zero : success
; Non-zero : unsuccessful
; Non-zero : unsuccessful
[[OS2 API:WinGetLastError|WinGetLastError]] could return:
[[WinGetLastError]] could return:
* [[OS2 API:PMI:error#PMERR_INVALID_PARAMETERS|PMERR_INVALID_PARAMETERS]]
* [[OS2 API:PMI:error#PMERR_INVALID_PARAMETERS|PMERR_INVALID_PARAMETERS]]
* [[OS2 API:PMI:error#PMERR_INVALID_PROCESS_ID|PMERR_INVALID_PROCESS_ID]]
* [[OS2 API:PMI:error#PMERR_INVALID_PROCESS_ID|PMERR_INVALID_PROCESS_ID]]
Line 21: Line 18:
* [[OS2 API:PMI:error#PMERR_INVALID_WINDOW|PMERR_INVALID_WINDOW]]
* [[OS2 API:PMI:error#PMERR_INVALID_WINDOW|PMERR_INVALID_WINDOW]]
* [[OS2 API:PMI:error#PMERR_NO_SPACE|PMERR_NO_SPACE]]
* [[OS2 API:PMI:error#PMERR_NO_SPACE|PMERR_NO_SPACE]]
=== Module ===


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


=== Calling conversion ===
=== Calling conversion ===
Line 33: Line 26:


=== Example Code ===
=== Example Code ===
  [[OS2 API:DataType:HSWITCH|HSWITCH]] switchHndl;
  HSWITCH switchHndl;
  [[OS2 API:DataType:SWTCNTRL|SWCNTRL]] switchControlStruct;  
  SWCNTRL switchControlStruct;  
  [[OS2 API:DataType:ULONG|ULONG]]   rc;
  ULONG  rc;
  ...
  ...
  rc = WinChangeSwitchEntry(switchHndl, switchControlStruct);
  rc = WinChangeSwitchEntry(switchHndl, switchControlStruct);
Line 41: Line 34:


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


=== Notes ===
=== Notes ===
If the standard window was created with [[OS2 API:Constant:FCF#FCF_TASKLIST|FCF_TASKLIST]] it is not necessary to call [[OS2_API:WinChangeSwitchEntry|WinChangeSwitchEntry]]; [[OS2_API:WinSetWindowText|WinSetWindowText]], on its handle, changes the title bar and task list text.
If the standard window was created with [[OS2 API:Constant:FCF#FCF_TASKLIST|FCF_TASKLIST]] it is not necessary to call WinChangeSwitchEntry; [[WinSetWindowText]], on its handle, changes the title bar and task list text.
 
If you want to change a few fields, not many, it is advisable to initialize the switch control structure via [[OS2 API:WinQuerySwitchEntry|WinQuerySwitchEntry]].  Then modify those fields and call [[OS2 API:WinChangeSwitchEntry|WinChangeSwitchEntry]] for the update.
 
=== OS Version Introduced ===
 
 
 
[[OS2_API | Back to OS/2 API]]


If you want to change a few fields, not many, it is advisable to initialize the switch control structure via [[WinQuerySwitchEntry]].  Then modify those fields and call '''WinChangeSwitchEntry''' for the update.


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

Revision as of 18:55, 23 December 2016

WinChangeSwitchEntry(switchHndl, switchControlStruct)
Modifies the specified entry in the task list.

Parameters

switchHndl - HSWITCH - input
The task list switch handle.
switchControlStruct - SWCNTRL - input
Switch control data.


Returns

ULONG with values of:

Zero
success
Non-zero
unsuccessful

WinGetLastError could return:

Define (C/C++)

INCL_WINSWITCHLIST or INCL_WIN or INCL_PM

Calling conversion

Cdecl32

Example Code

HSWITCH switchHndl;
SWCNTRL switchControlStruct; 
ULONG   rc;
...
rc = WinChangeSwitchEntry(switchHndl, switchControlStruct);
...

Related Functions

Notes

If the standard window was created with FCF_TASKLIST it is not necessary to call WinChangeSwitchEntry; WinSetWindowText, on its handle, changes the title bar and task list text.

If you want to change a few fields, not many, it is advisable to initialize the switch control structure via WinQuerySwitchEntry. Then modify those fields and call WinChangeSwitchEntry for the update.