WinEnablePhysInput: Difference between revisions
Appearance
Created page with "This function enables or disables queuing of physical input (keyboard or mouse). ==Syntax== WinEnablePhysInput(hwndDesktop, fEnable); ==Parameters== ;hwndDesktop (HWND) - in..." |
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 | ||
: | ::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== | ==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 | ||
: | ::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; | 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> | </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