Graphic tablet pressure support in CS4,CS5,CS5

  • 1
  • Problem
  • Updated 4 years ago
Dear Adobe experts,

I am a engineer in graphic tablet manufacturer.Now we are developing a driver for Photoshop in Microsoft Windows.I know Photoshop uses the Wintab32 inferface to communicate with the graphic tablet.I implemented the wintab32 and it works in CS2,CS3 perfectly.But in CS5,something preesure works good,but something lost,sometime the pen moved very slowly,and it also appeared in CS4,CS6.Why?I need your help.
Can you tell me how the CS5 calls the wintab32 function?or give me some tips?
Photo of Tan Huang

Tan Huang

  • 17 Posts
  • 0 Reply Likes

Posted 4 years ago

  • 1
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 766 Reply Likes
Photoshop does use Wintab, but 64 or 32 bit matching the application version being used.

And it sounds like you just have a problem with your wintab code, or are passing too many events through the normal windows event queue at the same time. You can debug it easier on your side than we can. Photoshop CS3,CS4,CS5,CS6 and CC all call wintab the same way.
Photo of Tan Huang

Tan Huang

  • 17 Posts
  • 0 Reply Likes
Dear Chris Cox,
Thank your for your reply soon and your advice.I will do some resarch on Windows event right now.
I am sure the the 32bit and 64bit software and driver were matched.
I used to use wine 1.6 to run CS2 get pressure successfully,but fail to run CS5 to get preesure.
I wonder what is the difference between the wintab32 function called on CS2 and CS4,5,6?

Thanks!
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 764 Reply Likes
As far as I know, there is no difference in how they use the wintab interface.

But if you are running under wine, then you have incomplete OS APIs -- you really should be running under native Windows to debug drivers and applications.
Photo of Tan Huang

Tan Huang

  • 17 Posts
  • 0 Reply Likes
I am happy to tell you ,the Photoshop CS5 will not become slow again because of your advice about too many events.But sometimes the pressure are OK,sometimes lost.I am debuging it.
Other painter software repson WT_PACKET message everytime when graphic tablet generated every point.I cancel the WT_PACKET message for Photoshop CS5 and it become smooth.
I found the CS2 called WTPacketsPeek and WTPacketsGet to get points,but CS5 only call WTPacketsGet.
Wine can help me to watch what wintab32 functions Photoshop called,that is why I use Wine.
Thanks a lot.
Photo of Tan Huang

Tan Huang

  • 17 Posts
  • 0 Reply Likes
Dear Chris Cox,

I debug my Wintab32 in VS2008.I run Photoshop CS5 in debug mode,but some exceptions were generated by VS2008.Do you know why?

Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 760 Reply Likes
C++ exceptions can occur due to normal program operation (canceling a preview, for example), and as part of normal OS operation.
If you hit an exception that isn't yours, just continue.
Photo of Tan Huang

Tan Huang

  • 17 Posts
  • 0 Reply Likes
This reply was created from a merged topic originally titled
Debug wintab32 in Visual Studio for pressure in Photoshop CS5.


I rewrite the Wintab32.dll by myself,it work in CS2 and CS3 perfectlly,but something wrong in CS4,CS5.Sometimes the preesure are OK,sometimes the stroke is like a point.Only the beginning of the stroke can visible.somtimes the stroke have no preesure.

Can you give me some tips to correct the problem?

In Photoshop CS3


In Photoshop CS5
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 760 Reply Likes
That sounds like we're getting a mouse/stylus up event immediately after the mouse down event.
Photo of Tan Huang

Tan Huang

  • 17 Posts
  • 0 Reply Likes
This reply was created from a merged topic originally titled
Graphic Tablet pressure lost.


I write Wintab32.dll,but open photoshop cs5.I draw "S" just show lines,then switch to other program and switch back.It works perfectly.Why?


We are graphic tablet manufacturer,so we want to optimize for Adobe product,can you give me some tips?
Photo of Tan Huang

Tan Huang

  • 17 Posts
  • 0 Reply Likes
Which wintab function was called when switch program?
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 764 Reply Likes
None that I know of, and I'm really not sure why your driver behaves differently after switching applications.
Photo of Tan Huang

Tan Huang

  • 17 Posts
  • 0 Reply Likes
But,it is no problem in CS2
Photo of Tan Huang

Tan Huang

  • 17 Posts
  • 0 Reply Likes
How Photoshop cs5 will do when receive WT_CTXOVERLAP and WT_PROXIMITY?
Photo of Tan Huang

Tan Huang

  • 17 Posts
  • 0 Reply Likes
I spent one week to slove the problem,now I am really confused
Photo of Tan Huang

Tan Huang

  • 17 Posts
  • 0 Reply Likes
I found if I use SendMessage API function to send wintab message to photoshop cs5,it can return back successful,but PostMessage API function faild.Do you know why?
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 738 Reply Likes
No, I'm not sure. Most likely it's some minor detail in the Microsoft APIs.