TouchPanelEnable(PFN_TOUCH_PANEL_CALLBACK pfnCallback);

P

Paul G. Tobey [eMVP]

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.
 
E

Edward E. Martins

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?
 
P

Paul G. Tobey [eMVP]

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.
 
P

Paul G. Tobey [eMVP]

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

Paul T.
 
E

Edward E. Martins Jr. via DotNetMonster.com

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...???
 
E

Edward E. Martins Jr. via DotNetMonster.com

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.
 
P

Paul G. Tobey [eMVP]

Then you don't need to disable the touch screen, as I see it, just ignore
touch inputs in the window procedure.

Paul T.
 
P

Paul G. Tobey [eMVP]

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

Paul T.
 
E

Edward E. Martins Jr. via DotNetMonster.com

OKok Paul, thanks for all.
Tomorrow I go to try this, now is to late. I go home...
 
E

Edward E. Martins Jr. via DotNetMonster.com

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...???
 
S

Sergey Bogdanov

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
 
P

Paul G. Tobey [eMVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top