Index   Commented   Search   About

Step 3: PE_GETPCMINFO Submessage

If the application calls DefWindowProc to process the PE_SETTARGETS submessage, every descendant of the window that received PE_SETTARGETS receives a PE_GETPCMINFO message. This message is so named because it gets information about the pen collection mode (PCM). The PCM describes the system state during an input session when the pen is writing and not operating as a mouse.

PE_GETPCMINFO gives each target the opportunity to:

  • Proclaim or disclaim itself as a valid target.

  • Specify termination conditions, such as timeout or range.

  • Identify areas in which tapping terminates the input session.

  • Do any combination of the above.

In processing PE_GETPCMINFO, the child window must fill in a PCMINFO structure that describes how pen interaction should proceed. If the candidate window wishes to receive input from the pen and become a true target, it can provide the coordinates of a bounding rectangle in the rectBound member of PCMINFO. The bounding rectangle constitutes the target area of the child window; inking that occurs within or nearest a bounding rectangle is sent to the window associated with the rectangle. If the child window does not process PE_GETPCMINFO, Windows does not consider the window a candidate for pen input but also does not prevent ink from overwriting the window.

DefWindowProc collects all bounding rectangles and exclusion rectangles provided by the descendant windows and creates a master PCMINFO structure that describes the situation.

For information about how to initialize and make changes to a PCMINFO structure, see the "Starting the Chain of Events" section in Chapter 3, "The Writing Process." See Chapter 11, "Pen Application Programming Interface Structures," for descriptions of the structure members.

Related Links

Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
TMS Scripter Studio Pro components for Delphi/C++Builder

More Online Helps

Win32 Programmer's Reference (win32.hlp)
Win32 Multimedia Programmer's Reference (mmedia.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages

Free Tech Secrets ;) Copyright © 2008 Free Tect Secrets ;) greatis just4fun network just4fun