{"id":54,"date":"2006-11-12T18:17:32","date_gmt":"2006-11-12T18:17:32","guid":{"rendered":"http:\/\/dalelane.co.uk\/blog\/?p=54"},"modified":"2006-11-12T18:23:13","modified_gmt":"2006-11-12T18:23:13","slug":"using-icontextmenu-to-extend-windows-apps","status":"publish","type":"post","link":"https:\/\/dalelane.co.uk\/blog\/?p=54","title":{"rendered":"Using IContextMenu to extend Windows apps"},"content":{"rendered":"<p>I read a couple of weeks ago about <a title=\"LA Times article\" target=\"_blank\" href=\"http:\/\/www.latimes.com\/business\/la-fi-google6oct06,0,945092.story\">Google acknowledging that they&#8217;d released too many products<\/a>, and deciding to focus on developing features for existing products where possible in future. <img decoding=\"async\" src=\"post-images\/061112-emailtriage.gif\" alt=\"screenshot\" align=\"left\" hspace=\"10\" vspace=\"10\"\/>With this in mind, this evening&#8217;s idea for <a title=\"blog post from when I started Windows Mobile work\" target=\"_blank\" href=\"http:\/\/dalelane.co.uk\/blog\/?p=35\">Windows Mobile development<\/a> is an extension to one of the core applications rather than a new application. <\/p>\n<p>&#8216;Email Triage&#8217; is my extension to Pocket Outlook. Pocket Outlook comes with Tasks, Calendar and Messaging (for emails, SMS, and MMS). Despite the way the &#8216;Pocket Outlook&#8217; sounds, these are more or less separate applications, which don&#8217;t interact other than sharing a common database to store information. As a user, the common name feels like mainly a branding thing. So I thought I&#8217;d try bringing them a bit closer together.<br clear=\"all\"\/><br \/>\n<!--more-->The idea of &#8220;Email Triage&#8221; is to help me get through my Inbox as efficiently as possible. Every email I get is either telling me about a meeting or event (in which case the information gets copied to my Calendar), asking me to do something (in which case I copy the information to my Task list), or contains some useful information that I need to keep (in which case I copy it for reference in my personal wiki). The 43Folders series on &#8216;<a href=\"http:\/\/www.43folders.com\/2006\/03\/13\/inbox-zero\/\" title=\"Inbox Zero series at 43Folders\" target=\"_blank\">Inbox Zero<\/a>&#8216; explains this better, but basically I try and keep my inbox empty &#8211; it&#8217;s a place where stuff waits temporarily to get processed. <\/p>\n<p>Doing this is much more long-winded when working on my PDA, so the idea of &#8220;Email Triage&#8221; is to let me zip through my Inbox very quickly, with just a couple of taps on the each message to choose how to file it &#8211; moving it to my Task list, using it to create an entry in Calendar, or filing it&#8217;s contents as a new page in my personal Wiki. <\/p>\n<p>This is more how I want to work on a PDA. It&#8217;s not a tool for getting into detailed work, but it should be great for making sure that I&#8217;m on top of any new work that has come in by email. <\/p>\n<p>Extending existing apps is a little more tricky than the drag-and-drop throw-code-together approach I got away with for my new programs. For starters, the <a href=\"http:\/\/msdn.microsoft.com\/library\/en-us\/guide_ppc\/html\/ppc_shortcut_menus.asp\" title=\"MSDN articles on Shortcut Menus\" target=\"_blank\">interface to extend menus and context menus<\/a> appears to have only been exposed to <a href=\"http:\/\/msdn.microsoft.com\/windowsmobile\/learning\/#WMApps\" title=\"Summary of the difference between native and managed code\" target=\"_blank\">native code<\/a> apps. <\/p>\n<p>The idea is to implement the <a title=\"Methods in the IContextMenu interface\" target=\"_blank\" href=\"http:\/\/msdn.microsoft.com\/library\/default.asp?url=\/library\/en-us\/guide_ppc\/html\/ppc__mdref_implementing_icontextmenu_and_iobjectwithsite_.asp\">IContextMenu interface<\/a> &#8211; whether you are extending a soft-key menu, context menu, or both. You then compile your code into a DLL, which needs to be registered on the PDA, so whichever app&#8217;s extension point you are adding menu items to knows to call on your code when the menu is created. <\/p>\n<p><code>QueryContextMenu<\/code> is called when the menu is created, so menu items can be created here. In <code>GetCommandString<\/code> you return the string that should be displayed in the menu item. And in <code>InvokeCommand<\/code> you put the code to run if the menu item is clicked on. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>I read a couple of weeks ago about Google acknowledging that they&#8217;d released too many products, and deciding to focus on developing features for existing products where possible in future. With this in mind, this evening&#8217;s idea for Windows Mobile development is an extension to one of the core applications rather than a new application. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-54","post","type-post","status-publish","format-standard","hentry","category-code"],"_links":{"self":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/54","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=54"}],"version-history":[{"count":0,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/54\/revisions"}],"wp:attachment":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=54"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=54"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=54"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}