Jaa


Using the Talk button

Ever wanted to use the phone's green Talk key (sometimes called the Send button) in your application?  You can, but the docs are pretty well hidden, so I thought I'd point them out: https://msdn.microsoft.com/library/default.asp?url=/library/en-us/APISP/html/sp_porting_guide_qgcc.asp?frame=true

Basically, your app sends a SHCMBM_OVERRIDEKEY message, once, to its own menu bar telling it "When the user presses the Talk button (when my app is foreground) I want to recieve that as a WM_HOTKEY from now on."

Obviously, the most common use for this is to initiate a phone call to a specific number from within your app (using PhoneMakeCall()).   I wouldn't recommend using it for something non-phone-related.

On Smartphone, you can also override some of the other hardware buttons like Volume Up and Down.

- Jason Fuller

Comments

  • Anonymous
    September 07, 2005
    Is there a way for a developer to force the speakerphone on during a call? The common request on sites like the pdaphonehome forums is for the speakerphone to be triggered by a physical button press. To rephrase this, could someone write a program that is assigned to a button that forces the speakerphone to toggle during a phone call.

    Thanks!

  • Anonymous
    September 07, 2005
    That is already standard functionality. While in a call, press and hold the call button - this will toggle the speakerphone on and off.

  • Anonymous
    September 08, 2005
    Boy, I wish I could edit that other post. I have no idea what I was thinking. I meant to ask if there was a way to MUTE the call. Again, I have no idea why I wrote about the speakerphone.

    Ugh.

    Can we assign Mute to a button...

    D.

  • Anonymous
    May 26, 2006
    Hi,

    how can I catch the red and green phone buttons on a Pocket PC Phone (WM5.0) system wide?

    Why - because I am writing my own phone app to replace the default.

    Thx.
    Paul

  • Anonymous
    June 21, 2006
    It seems that if SHCMBM_OVERRIDEKEY sent in a called process ,it did nothing.
    What do you think about this,dear everyone?

  • Anonymous
    June 27, 2006
    Application must include aygshell.lib
    to use SHCMBM_OVERRIDEKEY, but license fee for each smartphone is US$16 when using aygshell.lib. If you license a core version without aygshell.lib only costs you US$3.0.
    My problem is: How can I get the
    green talk key using core version?

  • Anonymous
    September 15, 2006
    I'd love to see an example of this posted.  I can't find a single working example online.

  • Anonymous
    October 18, 2006
    Is this a C++ only thing or is there a way to trap the talk key in C#?

  • Anonymous
    April 09, 2007
    I'd like to get notification for the Red button in my application as well. If anyone knows how to do this, please let me know! Thanks.

  • Anonymous
    April 11, 2007
    You can read this russian forum http://www.rsdn.ru/Forum/?mid=1957782 with my answer (with code).

  • Anonymous
    August 05, 2007
    On WM 5 Use Following: HWND wnd =  ((CMainFrame*)AfxGetMainWnd())->m_wndCommandBar.m_hWnd; ::SendMessage (wnd, SHCMBM_OVERRIDEKEY, VK_TTALK,             MAKELPARAM (SHMBOF_NODEFAULT | SHMBOF_NOTIFY,                         SHMBOF_NODEFAULT | SHMBOF_NOTIFY));

  • Anonymous
    September 16, 2007
    Other than the example that imranbaig given, anyone have another? I cannot understand it. Sorry.

  • Anonymous
    November 25, 2007
    How can I cath the RED button(VK_TEND) in my application?

  • Anonymous
    May 21, 2009
    how come if i have a full screen application without menubar?