Beginning an Input Session

A pen input session begins when the user touches pen to tablet and begins writing. The end of the session depends on parameters established by the application. Usually, the session ends when the user taps the pen outside the writing area or when a brief period of inactivity elapses. As when writing with a real pen, people tend to pause between words or sentences to gather their thoughts; an application can use these momentary pauses to get recognition results. A new session begins when the user begins writing again.

When the pen first touches the tablet at the start of an input session, Windows sends a WM_LBUTTONDOWN message to the application's main window procedure. In a pen-based environment, this message can indicate either a true mouse event or that the pen point has touched the tablet. The application must distinguish between these two possibilities before calling the DoDefaultPenInput function, as shown in the following fragment:

LONG lExtraInfo;

.

.

.

switch (wMsg)

{

case WM_LBUTTONDOWN:

// If true pen-down event, call DoDefaultPenInput.

lExtraInfo = GetMessageExtraInfo();

if (IsPenEvent( wMsg, lExtraInfo )

return DoDefaultPenInput( hwnd, LOWORD(lExtraInfo) );

else // No, it's a mouse

{ // button down

.

.

.

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