Jump to content

WinQueryExtIdFocus: Difference between revisions

From NikiWiki
Doodle (talk | contribs)
No edit summary
No edit summary
Line 10: Line 10:
Notes:
Notes:


When the Session Manager switches to another session (because of a DosSMSwitch() call), it calls internally WinSetExtIdFocus() too, if PM is present, to notify it about session switching. This API can be used to query the last session told to PM.
When the Session Manager switches to another session (because of a DosSMSwitch() call), it internally calls if PM is present WinSetExtIdFocus() to notify it about the session switch.  
This API can be used to query the last session told to PM.


Experiment shows that this API can be used to see if PM is the current foreground full-screen session, or not. The DosQuerySysState() API with the parameter QSV_FOREGROUND_FS_SESSION should return the session ID of the current foreground session, which is always 1 for PM. Unfortunately, it returns some other session ID, because it changes as the user changes focus between windowed VIO applications.
Tests show that this API can be used to see if PM is the current foreground full-screen session. The DosQuerySysState() API with the parameter QSV_FOREGROUND_FS_SESSION should return the session ID of the current foreground session, which for PM is always 1. Unfortunately, it returns some other session ID, as it changes when the user changes the focus between windowed VIO applications.


The WinQueryExtIdFocus() returns the same session ID that is returned by DosQuerySysState() when the PM is in foreground, but returns a different one, if PM is in the background.
The WinQueryExtIdFocus() returns the same session ID that is returned by DosQuerySysState() when the PM is in foreground, but returns a different one, if PM is in the background.

Revision as of 14:54, 6 January 2005

Definition for 16-bit programs:

USHORT EXPENTRY WinQueryExtIdFocus(PUSHORT pSessionId);

Definition for 32-bit programs:

USHORT APIENTRY16 WIN16QUERYEXTIDFOCUS(PUSHORT pSessionId);
#define WinQueryExtIdFocus WIN16QUERYEXTIDFOCUS

Notes:

When the Session Manager switches to another session (because of a DosSMSwitch() call), it internally calls if PM is present WinSetExtIdFocus() to notify it about the session switch. This API can be used to query the last session told to PM.

Tests show that this API can be used to see if PM is the current foreground full-screen session. The DosQuerySysState() API with the parameter QSV_FOREGROUND_FS_SESSION should return the session ID of the current foreground session, which for PM is always 1. Unfortunately, it returns some other session ID, as it changes when the user changes the focus between windowed VIO applications.

The WinQueryExtIdFocus() returns the same session ID that is returned by DosQuerySysState() when the PM is in foreground, but returns a different one, if PM is in the background.