SetPenAppFlags
2.0
An
application calls this function to set pen-specific properties that apply
globally to the application. This function replaces and enhances the RegisterPenApp
void SetPenAppFlags( UINT fuFlags, UINT
uVersion )
Parameters
fuFlags
Flags
specifying application options. The following flags can be combined by using
the bitwise-OR operator:
Constant |
Description |
RPA_HEDIT |
Specifies
that the system should treat any EDIT-class controls in the application as
having HEDIT class. |
RPA_KANJIFIXEDBEDIT |
Boxed edit
controls are a fixed size appropriate for use with kanji. (Japanese version
only.) |
RPA_DBCSPRIORITY |
By default,
double-byte equivalents of single-byte characters (as used in Japan) are
preferred in recognition results. |
RPA_SBCSPRIORITY |
By default,
single-byte characters are preferred in recognition results. (Japanese
version only.) |
RPA_DEFAULT |
Specifies
default pen behavior for the application. This includes RPA_HEDIT. |
uVersion
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.
Comments
SetPenAppFlags 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
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