Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

wintab32.dll & sample tablet application problems

Status
Not open for further replies.

perplexd

Programmer
May 9, 2002
154
US
Hi all,

I'm trying to adapt some open-source code to my needs, however the open source code which I am trying to use doesn't entirely work itself. The code can be downloaded from
The problem is that I do not understand how the dll is updating the data packets in pkData, and hence I cannot work out why dll only seems to update the pen pressure and not the coordinates of the pen.

pkData is defined as a user-defined type called Packet, which is designed to contain all the information about x,y,z,pressure and any buttons pressed. However I cannot find anywhere which specifically tells pkData to be populated with any information, yet it gets the pressure values correct although all other information stays static.

The only place where pkData is mentioned in the code is in modMessages.ReceivePacket, which is a sub which takes data out of pkData and places draws it onto the picture.

All help much appreciated!
 
As far as I can tell, pkData is a structure which defines the message layout. That message is transmitted from the tablet to Windows. That message is hooked so that application can process the data. It is in essence a "return" value from the tablet.

The indication of what pkData is supposed to contain is in the Tablet_Enable sub. Tablet_Enable calls TabletSetup, and within TabletSetup the following line appears
Code:
pLc.lcPktData = glRequestedData
and the value of glRequestedData is set to
Code:
Public Const glRequestedData As Long = PK_BUTTONS Or PK_X Or PK_Y Or PK_Z Or PK_NORMAL_PRESSURE
After the lcContext structure is intializes in TabletSetup, that structure is handed to the DLL via a call to WTOpen which sets up the table.
Code:
Call TabletSetup(lcContext)
glTabletContext = WTOpen(glWindowHandle, lcContext, -1)
I don't really know anything about this tablet, or this SDK, but based on a quick look at the code, such is my initial impression. Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Thanks CajunCenturion

So does that mean if i want to get more data than just the pressure (which is all it is giving me at the moment) then I have to change the value of glRequestedData?

If so where do I do this? I cannot see anywhere which states glRequestedData = PK_X or similar, only where it is defined as one of 5 possibilities.

In short: I want to get the coordinates, buttons and pressure from the tablet - not just the pressure which is all I am getting at the moment.

Please help, as I am quite new, and a bit overwhelmed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top