TouchPanelEnable(PFN_TOUCH_PANEL_CALLBACK pfnCallback);

  • Thread starter Thread starter Edward E. Martins
  • Start date Start date
That's going to be application-specific. What parameter would you pass, if
you were running in C? Have you tried NULL? What are you trying to
achieve? Just turn it back on after you turned it off?

Paul T.
 
Paut, thanks to reply this.
I tried null "TouchPanelEnable();" and the return was "TRUE", but when I
touch the screen, my application say goodbye and the touchscreen stops to
function pparently, and only shutdown the system restores the touch
screen...


That's going to be application-specific. What parameter would you pass, if
you were running in C? Have you tried NULL? What are you trying to
achieve? Just turn it back on after you turned it off?
 
It's not at all clear what the semantics of the function pointer passed to
the call are or whether disabling/reenabling a panel makes any sense. I'd
say that, unless you can find a sample of its use, you're out of luck.

Paul T.
 
Not dynamically, no. What's the scenario where you need to do that?

Paul T.
 
I agree. Previously I used

RAWINPUTDEVICE myRawDevice = new RAWINPUTDEVICE();
myRawDevice.usUsagePage = 0x01;
myRawDevice.usUsage = 0x02;
myRawDevice.dwFlags = RIDEV_NOLEGACY;//adds HID mouse and also ignores
legacy mouse messages

RegisterRawInputDevices(&myRawDevice, 1, (uint)sizeof(RAWINPUTDEVICE));

This function in my PC(WXP) run ok, but in the PPC(WCE) not, but this
function is in User32.dll.
You know another way to enable/disable the touch screen using compact
framework...???
 
The senario is this:
->My application start automatically on boot
->My application use total area of the PPC screen disabling the touch
screen, LWin and capture F1 to F2.
->The single user can only use the keybord in my application.
->The master user can leave my application and use the OS to give
maintenance, etc.
->After the master user give maintenance, he restarts the system (WarmBoot!)
and the cycle can happened again.
 
Then you don't need to disable the touch screen, as I see it, just ignore
touch inputs in the window procedure.

Paul T.
 
You might use OpenNETCF's ApplicationEx with a message filter and just
ignore the mouse messages.

Paul T.
 
OKok Paul, thanks for all.
Tomorrow I go to try this, now is to late. I go home...
 
Paul, in the form, this solution function perfectly, but in the MessageBox,
I can?t capture the mouse event... You have some idea to solve this...???
 
Except MessageBox it also won't work for forms that are opened with
ShowDialog. The MessageBox problem could be resolved by implementing
your own dialog that behaves like MessageBox (centered, topmost).

Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com
 
Yes, you're going to have problems with anything that starts another message
loop, as dialogs seem to do. You might consider implementing the modality
of your dialogs yourself with regular forms. You'll have to handle the case
where the user is trying to tap on something that shouldn't be in front,
etc. Or, you might try to subvert the ShowDialog() startup of another
message loop and trap the messages, as you're doing with the main form(s),
via a message filter.

Paul T.
 
Back
Top