You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
-
Thanks, great info! But how is it possible low level hooks do not work when WPF uses wrappers around standard windows messages? It works great in any non-WPF applications, but the apps using WPF do not behave as expected (I can correctly detect mouse events in a WPF application, but I can't cancel that event, even though it works in any other non-WPF application).– PayaCommented Mar 1, 2011 at 20:21
-
Maybe you should post an example? By the way, if you want to manage WPF input, you should look at the InputManager class.– Marat KhasanovCommented Mar 1, 2011 at 21:01
-
1Thanks. I found that your constant value for WM_RBUTTONUP is wrong. It should be 0x205. And there will be no context menu in WPF application ;)– Marat KhasanovCommented Mar 2, 2011 at 13:48
-
1Ah, thanks. I've quickly created that example, so in rush I've missed that (I use different class with correct WM_RBUTTONUP for development). I've done further testing and have discovered where the problem lies - I use computer with stylus for development, and I thought system just translates stylus input into mouse messages and that's it (for stylus-unaware apps). So it works correctly with standard Win32 app (stylus right click does nothing), but WPF apps are still able to detect that click, because they are stylus-aware (didn't know that). So now I need something like low level stylus hook.– PayaCommented Mar 2, 2011 at 14:18
-
2Unfortunately, I never worked with stylus and have no touch screen to test WPF stylus behavior. But I can tell you that it is very interesting how it works! HwndStylusInputProvider handles only WM_TABLET_FLICK and WM_TABLET_QUERYSYSTEMGESTURESTATUS and raises no events. There is another class called PenThreadWorker. It launches a new thread called "Stylus Input". This thread queries input events using GetPenEvent and GetPenEventMultiple functions from native DLL called "penimc.dll". Then it fires Stylus events corresponding to interop result.– Marat KhasanovCommented Mar 3, 2011 at 8:04
|
Show 4 more comments
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
-
create code fences with backticks ` or tildes ~
```
like so
``` -
add language identifier to highlight code
```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_`
- quote by placing > at start of line
- to make links (use https whenever possible)
<https://example.com>
[example](https://example.com)
<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. python-3.x), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you
default