locked
How to add item to filetype tap-and-hold context menu in windows mobile explorer? RRS feed

  • Question

  • Hi,

    I'm currently having trouble adding an item or command to the tap and hold / context
    menu for a particular file type in the Windows Mobile file explorer.

    I have no trouble on the desktop. I creat this registry key and it works:

    HKEY_LOCAL_MACHINE/SOFTWARE/Classes/<filetype>/shell/<newcommandname>/command/
    with value "path to an exe" %1

    Is there an equivalent for the Windows Mobile explorer?
    I need to be able to tap and hold on a particular file type in explorer, have a new command appear on
    the pop up menu, and when that command is selected, have the file and path of the file tapped on sent to an executable/application.


    Any help would be greatly appreciated.

    SH
    Wednesday, March 25, 2009 2:57 PM

Answers

  • Hi,

    As far as I am aware there isn't a simple way (such as configuring a few registry settings) to achieve this.

    It is possible if you are able to develop and deploy a small COM based DLL project that is then registered with the device.

    The Windows Mobile 5.0 and 6.0 Device SDKs include a code sample which demonstrates this API. You are looking for the "Context Menu Extension Handler" code sample which is documented on MSDN at http://msdn.microsoft.com/en-us/library/ms880622.aspx.

    By modifying the source code of that code sample you should be able to implement a context menu item which only appears for specific file extensions etc.

    Hope this helps,
    Christopher Fairbairn

    Visit my blog at http://www.christec.co.nz/blog/
    • Marked as answer by S Hogg Friday, March 27, 2009 11:11 AM
    Friday, March 27, 2009 2:42 AM

All replies

  • Hi,

    As far as I am aware there isn't a simple way (such as configuring a few registry settings) to achieve this.

    It is possible if you are able to develop and deploy a small COM based DLL project that is then registered with the device.

    The Windows Mobile 5.0 and 6.0 Device SDKs include a code sample which demonstrates this API. You are looking for the "Context Menu Extension Handler" code sample which is documented on MSDN at http://msdn.microsoft.com/en-us/library/ms880622.aspx.

    By modifying the source code of that code sample you should be able to implement a context menu item which only appears for specific file extensions etc.

    Hope this helps,
    Christopher Fairbairn

    Visit my blog at http://www.christec.co.nz/blog/
    • Marked as answer by S Hogg Friday, March 27, 2009 11:11 AM
    Friday, March 27, 2009 2:42 AM
  • Hi. Thanks for your reply.

    I found that sample and managed to get it to work yesterday. I didn't have time
    before you took the time ot reply to put a note on here saying that I'd found a solution.
    So you were right. I'm amazed at how more complicated it was to get it working...

    Thanks again
    Simon

    Friday, March 27, 2009 11:11 AM