Click here to Skip to main content
15,927,592 members
Home / Discussions / Mobile
   

Mobile

 
GeneralRe: Playing AVI on Windows Mobile using C# Pin
BosGaurus29-Apr-09 7:33
BosGaurus29-Apr-09 7:33 
Questionc# : How can i control Send/Receive event ? Pin
Idandush26-Apr-09 23:03
Idandush26-Apr-09 23:03 
QuestionHow Should I start Pin
ashish8patil25-Apr-09 3:33
ashish8patil25-Apr-09 3:33 
AnswerRe: How Should I start Pin
PavanPareta25-Apr-09 21:30
PavanPareta25-Apr-09 21:30 
GeneralRe: How Should I start Pin
ashish8patil26-Apr-09 22:15
ashish8patil26-Apr-09 22:15 
GeneralRe: How Should I start Pin
Jabbar_espania30-Apr-09 23:37
Jabbar_espania30-Apr-09 23:37 
QuestionHost USB in Windows Mobile 5.0 Pin
mkohns24-Apr-09 5:40
mkohns24-Apr-09 5:40 
QuestionWM_KEYUP event while button VK_TTALK button still held down Pin
SteveKier23-Apr-09 8:26
SteveKier23-Apr-09 8:26 
I’m trying to use the green TALK button on my Pocket PC as a floor control button. That means I need to know when the user presses it and when they release it.

I’ve found several ways to be informed when the user presses the VK_TTALK button, and I’ve been able to take control of the association with the default phone application (details below if you care to see them). The problem I’m having is determining when the user releases the button.

What happens is, no matter how long I hold the button down, I get a WM_KEYUP for VK_TTALK within a few hundred milliseconds of the key press event. This happens even though I hold the button down for many seconds after pressing it. (I see that this gentleman appears to have faced the same or a very similar issue.)

Can anyone tell me if there’s a way to do this? I’m beginning to think maybe it’s just a problem with the 6700 hardware or firmware. Or maybe it’s a more widespread issue? Any other ideas?

By the way, it happens that I’m working on an HTC6700, but I really need a portable solution that will work on any Pocket PC. A 6700-specific solution – though it might be cool and fun – really won’t help me. My environment, BTW, is C++ in MS Visual Studio 2005.

Approaches I’ve tried:

  1. SHCMBM_OVERRIDEKEY – I’ve used SendMessage(… SHCMBM_OVERRIDEKEY, VK_TTALK, …), as described here, to request that TALK button events be passed to me as WM_HOTKEY events.

    1. What worked: The built-in phone app launch was bypassed, so that’s good. And I did get WM_HOTKEY events for the button presses.
    2. What didn’t work: I got WM_KEYUP events telling me the user had released the TALK button, but they came way too soon, while I was still holding the button down.

  2. UnregisterFunc1(), UnregisterHotKey(), RegisterHotKey() – There’s a lot of discussion (here and here, e.g.) about this option. I’ve tried it and had problems similar to the ones I describe above.

    1. What worked: I avoided the phone app launch, and I did get WM_HOTKEY events for presses (and releases, too, if I recall correctly).
    2. What didn’t work: But the release events came too soon, as they did elsewhere. Also, after I exited my application, the connection between the TALK button and the built-in phone application was still broken. There’s probably a way I could restore that, but since the release events were no good, I doubt I’ll pursue this option.

  3. SHSetAppKeyWndAssoc() – I had high hopes for this one (described here), and it did let me grab keys other than VK_TTALK, but I wasn’t able to get VK_TTALK with it at all, and even with the keys I could get, I didn’t see any notice of key release events.
  4. SetWindowsHookEx() – I found some documentation of how to add a hook for low-level keyboard events (see here, e.g.) and tried it. I got the events, but they behaved just the same as SHCMBM_OVERRIDEKEY above. That is, I was told the button was pressed, and then told a too-short time later that it was released (when I was still holding it down).
  5. GetAsyncKeyState() – I even considered polling methods. I thought maybe I could start with one of the above methods, which at least notified me on the button press, and then poll to watch for the user to subsequently release the button. GetAsyncKeyState() is supposed to tell you whether a given button is down or up. And it did correctly report the button as being pressed when the event came telling me that it was pressed. But when a subsequent event came telling me (incorrectly) that it had been released, GetAsyncKeyState() ALSO told me the button was not pressed. So that’s no help.

I’m running out of ideas. How about you?

Thanks for any guidance you can provide!

Steve
AnswerRe: WM_KEYUP event while button VK_TTALK button still held down Pin
killabyte1-May-09 2:59
killabyte1-May-09 2:59 
GeneralRe: WM_KEYUP event while button VK_TTALK button still held down Pin
SteveKier1-May-09 6:58
SteveKier1-May-09 6:58 
GeneralRe: WM_KEYUP event while button VK_TTALK button still held down Pin
killabyte1-May-09 14:19
killabyte1-May-09 14:19 
QuestionGSM Modem alternative Pin
tatchung22-Apr-09 21:28
tatchung22-Apr-09 21:28 
AnswerRe: GSM Modem alternative Pin
killabyte1-May-09 19:11
killabyte1-May-09 19:11 
QuestionSQLCE Connection Problems Pin
vafo22-Apr-09 5:02
vafo22-Apr-09 5:02 
AnswerRe: SQLCE Connection Problems [modified] Pin
PavanPareta22-Apr-09 9:13
PavanPareta22-Apr-09 9:13 
GeneralRe: SQLCE Connection Problems [modified] Pin
vafo23-Apr-09 0:42
vafo23-Apr-09 0:42 
AnswerRe: SQLCE Connection Problems Pin
~Khatri Mitesh~28-Apr-09 0:23
~Khatri Mitesh~28-Apr-09 0:23 
AnswerRe: SQLCE Connection Problems Pin
Jabbar_espania30-Apr-09 2:05
Jabbar_espania30-Apr-09 2:05 
GeneralRe: SQLCE Connection Problems Pin
Don Fizachi14-Sep-09 12:16
Don Fizachi14-Sep-09 12:16 
QuestionRadio Buttons Styling (Windows Mobile 6) Pin
vafo21-Apr-09 3:36
vafo21-Apr-09 3:36 
AnswerRe: Radio Buttons Styling (Windows Mobile 6) Pin
Joel Ivory Johnson21-Apr-09 12:22
professionalJoel Ivory Johnson21-Apr-09 12:22 
GeneralRe: Radio Buttons Styling (Windows Mobile 6) Pin
vafo22-Apr-09 4:56
vafo22-Apr-09 4:56 
QuestionHow to convert (string -> xml) with window mobile? Pin
YochangSong20-Apr-09 18:57
YochangSong20-Apr-09 18:57 
AnswerRe: How to convert (string -> xml) with window mobile? Pin
Joel Ivory Johnson21-Apr-09 12:11
professionalJoel Ivory Johnson21-Apr-09 12:11 
GeneralRe: How to convert (string -> xml) with window mobile? Pin
Jabbar_espania30-Apr-09 23:46
Jabbar_espania30-Apr-09 23:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.