beautypg.com

Recommended panelview plus ce mechanisms, Disable keypad handler – Rockwell Automation 2711P Software Development Kit User Manual User Manual

Page 80

background image

Publication 2711P-UM005A-EN-P - March 2007

80 PanelView Plus CE-Specific Extensions to the WinCE API

Recommended PanelView
Plus CE Mechanisms

These Win32 mechanisms have specific utility or packaging for the
PanelView Plus CE platform. Some are simply not handled properly
by the Platform Builder exporter and the PanelView Plus CE header
file is described here for convenience.

Disable Keypad Handler

The PanelView Plus CE device supports a mechanism known as the
keypad handler that permits the F-keys and K-keys on the keypad to
be remapped to emulate alternate keys and/or multiple key presses.
Refer to Keypad Overview on page 69. An application or a dialog that
relies on unmapped keys should send a window message to the
keypad handler to turn off the keypad mappings. Subsequently, the
keypad handler can be re-enabled using a similar message.

Remarks

Call RegisterWindowMessage() with the value WM_
KEYPAD_HANDLER.

Call SendNotifyMessage() with the message identifier that was
returned from RegisterWindowMessage() to disable and then to
enable keypad mappings.

The first parameter enables keypad mappings when TRUE and
disables the mappings when FALSE. The second parameter is ignored.

Restarting the system will restart the keypad handler, which enables
the keypad mappings.

Behavior of the fixed (non-programmable) keys is unaffected.

The following code snip illustrates the mechanism:

UINT msgID =
RegisterWindowMessage(WM_KEYPAD_HANDLER);

// This dialog requires an unmapped keypad. Turn off the
keypad handler

SendNotifyMessage( HWND_BROADCAST, msgID, FALSE, 0 );