SAMPLE: Advanced ALC_ Sample and ShowKeyboard() Sample

Last reviewed: February 15, 1996
Article ID: Q98627
The information in this article applies to:
  • Microsoft Windows for Pen Computing version 1.0

SUMMARY

In the Microsoft Software Library, there is a sample called AlcKey. This is a Windows for Pen Computing sample that demonstrates how to use the ALC values (defined in Windows for Pen Computing) to set how an hedit (or bedit) control filters its input.

Download ALCKEY.EXE, a self-extracting file, from the Microsoft Software Library (MSL) on the following services:

  • Microsoft Download Service (MSDL)

          Dial (206) 936-6735 to connect to MSDL
          Download ALCKEY.EXE (size: 25286 bytes) 
    
  • Internet (anonymous FTP)

          ftp ftp.microsoft.com
          Change to the \SOFTLIB\MSLFILES directory
          Get ALCKEY.EXE (size: 25286 bytes) 
    

MORE INFORMATION

ALC values can be set to define what values are recognized in a pen edit control (either hedit or bedit). For example, by setting ALC_NUMERIC, only numeric values are recognized in that particular control. Using ALC values allows developers greater freedom to customize how their application responds to ink. By defining a small subset of only the types of values wanted in an edit control, recognition of those values increases.

The AlcKey sample has two edit controls, hedit and bedit. By selecting the ALC flags desired via the ALC dialog box, the hedit control is set to those values. The bedit control is not altered, allowing the developer to view the difference between the settings of the two controls.

The AlcKey sample also demonstrates the use of the ShowKeyboard() application programming interface (API), including the recommended way of interfacing to the virtual keyboard via a "keyboard" button; which is OwnerDraw. Note that the virtual keyboard always stays on top, but never has the focus. The output of the keyboard is directed to the last control that had the focus. Note also that the virtual keyboard in Windows for Pen Computing version 1.0 is not affected by the filtering effects of the ALC values. Only recognized ink is affected; the keyboard does not involve inking, so it bypasses this step.


Additional reference words: 1.00 softlib ALCKEY.EXE
KBCategory: kbprg kbfile
KBSubcategory: WpenKeyboard


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 15, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.