Jump to content

WinEnablePhysInput

From EDM2
Revision as of 01:16, 7 April 2024 by Martini (talk | contribs) (Created page with "This function enables or disables queuing of physical input (keyboard or mouse). ==Syntax== WinEnablePhysInput(hwndDesktop, fEnable); ==Parameters== ;hwndDesktop (HWND) - in...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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);

Definition

#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);

Related Functions

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