An application calls this function to set pen-specific properties that apply globally to the application. This function replaces and enhances the RegisterPenApp function from version 1.0 of Pen Windows.

  • oid SetPenAppFlags( UINT fuFlags, UINT uVersion )



Flags specifying application options. The following flags can be combined by using the bitwise-OR operator:

Specifies that the system should treat any EDIT-class controls in the application as having HEDIT class.
Boxed edit controls are a fixed size appropriate for use with kanji. (Japanese version only.)
By default, double-byte equivalents of single-byte characters (as used in Japan) are preferred in recognition results.
By default, single-byte characters are preferred in recognition results. (Japanese version only.)
Specifies default pen behavior for the application. This includes RPA_HEDIT.


The Pen API version number. The nonzero value PENVER causes the application to be registered with Windows. A value of 0 unregisters the application.

Return Value

This function does not return a value.


should be called when an application starts with PENVER for the uVersion parameter. PENVER is the Pen API version number, defined in PENWIN.H.

PENVER ensures that the structures used are appropriate for the version of the Pen API for which the application was compiled. In version 1.0, uVersion was a BOOL value, so by default the version number was 0x0001. Beginning with Pen API version 2.0, PENVER contains the major release number in the HIBYTE and the minor release number in the LOBYTE. Thus, for version 2.0, PENVER is defined as 0x0200.

When an application terminates, it should call SetPenAppFlags with uVersion set to 0. An application can unregister itself in this way more than once without error to accommodate alternative exit code paths.

An application can call GetPenAppFlags to determine which flags were set by an earlier call to SetPenAppFlags. However, normally only the system requires this information.

Applications written specifically for Windows 95 and later Windows versions automatically get RPA_DEFAULT so that any edit controls created by such applications become pen-aware.

See Also


Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
Unix Manual Pages
Delphi Examples
Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database