Jump to content

WinEnablePhysInput: Difference between revisions

From EDM2
Created page with "This function enables or disables queuing of physical input (keyboard or mouse). ==Syntax== WinEnablePhysInput(hwndDesktop, fEnable); ==Parameters== ;hwndDesktop (HWND) - in..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
This function enables or disables queuing of physical input (keyboard or mouse).  
This function enables or disables queuing of physical input (keyboard or mouse).
 
==Syntax==
==Syntax==
  WinEnablePhysInput(hwndDesktop, fEnable);
  WinEnablePhysInput(hwndDesktop, fEnable)
 
==Parameters==
==Parameters==
;hwndDesktop (HWND) - input
;hwndDesktop (HWND) - input:Desktop-window handle.
:Desktop-window handle.
::HWND_DESKTOP - The desktop-window handle
:;HWND_DESKTOP
::Other - Specified desktop-window handle.
::The desktop-window handle  
;fEnable (BOOL) - input:New state for the queuing of physical input.
:;Other
::TRUE - Pointing device and keyboard input are queued
::Specified desktop-window handle.  
::FALSE - Pointing device and keyboard input are disabled.


;fEnable (BOOL) - input
:New state for the queuing of physical input.
:;TRUE
::Pointing device and keyboard input are queued
:;FALSE
::Pointing device and keyboard input are disabled.
==Returns==
==Returns==
;rc (BOOL) - returns
;rc (BOOL) - returns:Previous state for the queuing of physical input.
:Previous state for the queuing of physical input.
::TRUE - Pointing device and keyboard input were queued
:;TRUE
::FALSE - Pointing device and keyboard input were disabled.
::Pointing device and keyboard input were queued
 
:;FALSE
::Pointing device and keyboard input were disabled.
==Errors==
==Errors==
Possible returns from WinGetLastError
Possible returns from WinGetLastError
;PMERR_INVALID_HWND (0x1001)
;PMERR_INVALID_HWND (0x1001):An invalid window handle was specified.
:An invalid window handle was specified.
 
==Example Code==
==Example Code==
This example uses WinEnablePhysInput to enable queuing of physical input (pointing device and keyboard).
This example uses WinEnablePhysInput to enable queuing of physical input (pointing device and keyboard).
<pre>
<pre>
#define INCL_WININPUT          /* Window Input Functions       */
#define INCL_WININPUT          /* Window Input Functions     */
#include <os2.h>
#include <os2.h>


BOOL  fOldInputState;   /* previous queuing state               */
BOOL  fOldInputState;       /* previous queuing state         */
BOOL  fNewInputState=TRUE;/* new queuing state                 */
BOOL  fNewInputState=TRUE; /* new queuing state             */


/* enable queuing of physical input */
/* enable queuing of physical input */
fOldInputState = WinEnablePhysInput(HWND_DESKTOP, fNewInputState);
fOldInputState = WinEnablePhysInput(HWND_DESKTOP, fNewInputState);
</pre>
Definition
<pre>
#define INCL_WININPUT /* Or use INCL_WIN, INCL_PM, */
#include <os2.h>
HWND    hwndDesktop;  /*  Desktop-window handle. */
BOOL    fEnable;      /*  New state for the queuing of physical input. */
BOOL    rc;          /*  Previous state for the queuing of physical input. */
rc = WinEnablePhysInput(hwndDesktop, fEnable);
</pre>
</pre>



Latest revision as of 20:12, 12 April 2024

This function enables or disables queuing of physical input (keyboard or mouse).

Syntax

WinEnablePhysInput(hwndDesktop, fEnable)

Parameters

hwndDesktop (HWND) - input
Desktop-window handle.
HWND_DESKTOP - The desktop-window handle
Other - Specified desktop-window handle.
fEnable (BOOL) - input
New state for the queuing of physical input.
TRUE - Pointing device and keyboard input are queued
FALSE - Pointing device and keyboard input are disabled.

Returns

rc (BOOL) - returns
Previous state for the queuing of physical input.
TRUE - Pointing device and keyboard input were queued
FALSE - Pointing device and keyboard input were disabled.

Errors

Possible returns from WinGetLastError

PMERR_INVALID_HWND (0x1001)
An invalid window handle was specified.

Example Code

This example uses WinEnablePhysInput to enable queuing of physical input (pointing device and keyboard).

#define INCL_WININPUT           /* Window Input Functions     */
#include <os2.h>

BOOL  fOldInputState;       /* previous queuing state         */
BOOL  fNewInputState=TRUE;  /* new queuing state              */

/* enable queuing of physical input */
fOldInputState = WinEnablePhysInput(HWND_DESKTOP, fNewInputState);

Related Functions

  • WinFocusChange
  • WinGetKeyState
  • WinGetPhysKeyState
  • WinQueryFocus
  • WinSetFocus
  • WinSetKeyboardStateTable