<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Prabhu Kumar</title>
        <link>http://geekswithblogs.net/TechTwaddle/Default.aspx</link>
        <description> a tech twaddler..</description>
        <language>en-US</language>
        <copyright>TechTwaddle</copyright>
        <managingEditor>p.kumar999@gmail.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <image>
            <title>Prabhu Kumar</title>
            <url>http://geekswithblogs.net/images/RSS2Image.gif</url>
            <link>http://geekswithblogs.net/TechTwaddle/Default.aspx</link>
            <width>77</width>
            <height>60</height>
        </image>
        <item>
            <title>More "Getting started with managed code (C#) development for Windows Mobile" articles</title>
            <category>General</category>
            <link>http://geekswithblogs.net/TechTwaddle/archive/2009/11/20/more-getting-started-with-managed-code-c-development-for-windows.aspx</link>
            <description>&lt;p style="text-align: justify"&gt;&lt;span style="font-family: Comic Sans MS"&gt;Last year &lt;/span&gt;&lt;a href="http://www.cjcraft.com/blog/default.aspx"&gt;&lt;span style="font-family: Comic Sans MS"&gt;Chris Craft&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Comic Sans MS"&gt; wrote this excellent "&lt;/span&gt;&lt;a href="http://www.cjcraft.com/blog/default,month,2008-06.aspx"&gt;&lt;span style="font-family: Comic Sans MS"&gt;30 days of .NET&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Comic Sans MS"&gt;" articles where he wrote 30 .NET applications in C# each day. I have gone through the initial few and plan to complete the list as and when I find time. He hasn't actually explained the code and the application logic in detail and that would surely be some task if you are doing 30 apps in 30 days (; You couldn't ask for more.&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-align: justify"&gt;&lt;span style="font-family: Comic Sans MS"&gt;The source code for all the applications is available. So just &lt;/span&gt;&lt;a href="http://www.cjcraft.com/blog/2008/06/02/30DaysOfNETWindowsMobileApplicationsDay01MinutesToMidnightCountdown.aspx"&gt;&lt;span style="font-family: Comic Sans MS"&gt;download'em and dig through&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Comic Sans MS"&gt;. There's no better way to learn than to dive-in and experiment.&lt;br /&gt;
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=136435"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=136435" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/TechTwaddle/aggbug/136435.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>TechTwaddle</dc:creator>
            <guid>http://geekswithblogs.net/TechTwaddle/archive/2009/11/20/more-getting-started-with-managed-code-c-development-for-windows.aspx</guid>
            <pubDate>Fri, 20 Nov 2009 11:53:14 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/TechTwaddle/comments/136435.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/TechTwaddle/archive/2009/11/20/more-getting-started-with-managed-code-c-development-for-windows.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/TechTwaddle/comments/commentRss/136435.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/TechTwaddle/services/trackbacks/136435.aspx</trackback:ping>
        </item>
        <item>
            <title>Windows Mobile 6.5 Gestures : Introduction (C++)</title>
            <category>General</category>
            <link>http://geekswithblogs.net/TechTwaddle/archive/2009/11/20/windows-mobile-6.5-gestures--introduction-c.aspx</link>
            <description>&lt;p&gt;&lt;span style="font-family: Comic Sans MS"&gt;Found a nice article on &lt;/span&gt;&lt;a href="http://www.codeproject.com/KB/mobile/IntroToGesturesAPI.aspx?msg=3279054#xx3279054xx"&gt;&lt;span style="font-family: Comic Sans MS"&gt;Code Project&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Comic Sans MS"&gt; about using gesture API's on Windows Mobile 6.5 devices.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.codeproject.com/KB/mobile/IntroToGesturesAPI.aspx?msg=3279054#xx3279054xx"&gt;&lt;span style="font-family: Comic Sans MS"&gt;Hit the link&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Comic Sans MS"&gt; and give it a read.&lt;/span&gt; &lt;span style="font-family: Comic Sans MS"&gt;And off I go to try the program out.&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-align: justify"&gt;&lt;span style="color: #003300"&gt;&lt;span style="font-family: Comic Sans MS"&gt;Update:&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Comic Sans MS"&gt;&lt;br /&gt;
Well, I gave the program a try and it works nicely. I have one concern however. When you double tap, you get a &lt;span style="font-family: Verdana"&gt;GID_SELECT&lt;/span&gt; message first and then &lt;span style="font-family: Verdana"&gt;GID_DOUBLESELECT&lt;/span&gt;, but what if I want to handle both messages differently? Like for example in a game where I want &lt;span style="font-family: Verdana"&gt;GID_SELECT&lt;/span&gt; and &lt;span style="font-family: Verdana"&gt;GID_DOUBLESELECT&lt;/span&gt; to do different things exclusively. I don't want the &lt;span style="font-family: Verdana"&gt;SELECT&lt;/span&gt; code executing when the user &lt;span style="font-family: Verdana"&gt;DOUBLESELECTs&lt;/span&gt;. Is this a valid concern?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=136434"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=136434" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/TechTwaddle/aggbug/136434.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>TechTwaddle</dc:creator>
            <guid>http://geekswithblogs.net/TechTwaddle/archive/2009/11/20/windows-mobile-6.5-gestures--introduction-c.aspx</guid>
            <pubDate>Fri, 20 Nov 2009 11:38:12 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/TechTwaddle/comments/136434.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/TechTwaddle/archive/2009/11/20/windows-mobile-6.5-gestures--introduction-c.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/TechTwaddle/comments/commentRss/136434.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/TechTwaddle/services/trackbacks/136434.aspx</trackback:ping>
        </item>
        <item>
            <title>Windows Marketplace Now Available for Windows Mobile 6.0 and 6.1 "officially"</title>
            <category>General</category>
            <link>http://geekswithblogs.net/TechTwaddle/archive/2009/11/16/windows-marketplace-now-available-for-windows-mobile-6.0-and-6.1.aspx</link>
            <description>&lt;p style="text-align: justify"&gt;&lt;span style="font-family: Comic Sans MS"&gt;Windows Marketplace for mobile, which was up until now only available for Windows Mobile 6.5 users, is now officially made available for Windows Mobile 6.0 and 6.1 devices. This is great news since it adds almost the entire windows mobile user base to the marketplace equation in one scoop!&lt;/span&gt;&lt;/p&gt;
&lt;p style=""&gt;&lt;span style="font-family: Comic Sans MS"&gt;You can catch more details below:&lt;/span&gt;&lt;/p&gt;
&lt;p style=""&gt;&lt;span style="font-family: Comic Sans MS"&gt;&lt;a href="http://windowsteamblog.com/blogs/windowsphone/archive/2009/11/16/windows-marketplace-for-windows-mobile-6-0-and-6-1.aspx"&gt;Windows Marketplace for Windows Mobile 6.0 and 6.1&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=""&gt; &lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=136342"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=136342" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/TechTwaddle/aggbug/136342.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>TechTwaddle</dc:creator>
            <guid>http://geekswithblogs.net/TechTwaddle/archive/2009/11/16/windows-marketplace-now-available-for-windows-mobile-6.0-and-6.1.aspx</guid>
            <pubDate>Tue, 17 Nov 2009 00:27:09 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/TechTwaddle/comments/136342.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/TechTwaddle/archive/2009/11/16/windows-marketplace-now-available-for-windows-mobile-6.0-and-6.1.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/TechTwaddle/comments/commentRss/136342.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/TechTwaddle/services/trackbacks/136342.aspx</trackback:ping>
        </item>
        <item>
            <title>Getting started with Windows Mobile Development : Managed Code</title>
            <category>General</category>
            <link>http://geekswithblogs.net/TechTwaddle/archive/2009/11/14/getting-started-with-windows-mobile-development--managed-code.aspx</link>
            <description>&lt;p style="text-align: justify;"&gt;&lt;span style="font-family: Comic Sans MS;"&gt;I stumbled across this series of posts by Maarten Struys and Dougturn on "&lt;span style="color: rgb(0, 51, 0);"&gt;Getting started with windows mobile development with Visual C#&lt;/span&gt;". I remember &lt;a href="http://www.j2i.net/BlogEngine/"&gt;Joel&lt;/a&gt; too having mentioned it in one of his &lt;a href="http://www.j2i.net/BlogEngine/post.aspx?id=33138e1e-41bb-4b5d-bd62-9c1076207b5f"&gt;posts&lt;/a&gt;. I went through a couple of articles and was able to create a few basic applications in C#. I must mention that creating a basic application with your menus and a few controls takes no time at all in visual C#. The visual designer is nice, supports a lot more controls and takes care of things that you would usually have to write code for if you were developing in Win32/C++.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Comic Sans MS;"&gt;Here are the links to the series, and I suggest you read through them whenever you find time.&lt;br /&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Comic Sans MS;"&gt;&lt;a href="http://www.codeproject.com/KB/mobile/MOB4DEVS01.aspx?msg=3253291"&gt;Part 1: Creating your first application&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Comic Sans MS;"&gt;&lt;a href="http://www.codeproject.com/KB/mobile/MOB4DEVS02.aspx"&gt;Part 2: Device Emulator and Device Emulator Manager&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Comic Sans MS;"&gt;&lt;a href="http://www.codeproject.com/KB/mobile/MOB4DEVS03.aspx"&gt;Part 3: Basic WinForm App development for Windows Mobile Devices&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Comic Sans MS;"&gt;&lt;a href="http://www.codeproject.com/KB/mobile/MOB4DEVS04.aspx"&gt;Part 4: Adding Custom Controls and Making Use of GPS Hardware&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Comic Sans MS;"&gt;&lt;a href="http://www.codeproject.com/KB/mobile/MOB4DEVS05.aspx"&gt;Part 5: Introduction to SQL Server CE&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Comic Sans MS;"&gt;&lt;a href="http://www.codeproject.com/KB/mobile/MOB4DEVS06.aspx"&gt;Part 6: Device Security and Application Deployment&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Comic Sans MS;"&gt;&lt;a href="http://www.codeproject.com/KB/mobile/MOB4DEVS07.aspx"&gt;Part 7: Mobile Web Development&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=136301"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=136301" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/TechTwaddle/aggbug/136301.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>TechTwaddle</dc:creator>
            <guid>http://geekswithblogs.net/TechTwaddle/archive/2009/11/14/getting-started-with-windows-mobile-development--managed-code.aspx</guid>
            <pubDate>Sat, 14 Nov 2009 07:48:35 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/TechTwaddle/comments/136301.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/TechTwaddle/archive/2009/11/14/getting-started-with-windows-mobile-development--managed-code.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/TechTwaddle/comments/commentRss/136301.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/TechTwaddle/services/trackbacks/136301.aspx</trackback:ping>
        </item>
        <item>
            <title>Displaying a context menu in your application</title>
            <category>General</category>
            <link>http://geekswithblogs.net/TechTwaddle/archive/2009/11/13/displaying-a-context-menu-in-your-application.aspx</link>
            <description>&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Comic Sans MS;"&gt;Context menus really add to the user experience. You may decide to display a context popup menu when the user taps-and-holds or double-taps on the touch screen. In this post we will see how a few lines of code enable you to do just that.&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;/div&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Comic Sans MS;"&gt;While reading about popup menus I came across the &lt;a href="http://msdn.microsoft.com/en-us/library/aa931036.aspx"&gt;&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;WM_CONTEXTMENU&lt;/span&gt;&lt;/a&gt; message. According to the windows mobile documentation that I referred this message is sent to a window when the user right clicks on the window's client area. Since I haven't yet seen a windows mobile device which supports right click functionality, I decided to leave it at that. And for this demonstration I display my context menu whenever the user double clicks (or double taps) on the screen. Remember that for your window to recieve a &lt;a href="http://msdn.microsoft.com/en-us/library/aa926302.aspx"&gt;&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;WM_LBUTTONDBLCLK&lt;/span&gt;&lt;/a&gt; message when the user double clicks, you should set the &lt;a href="http://msdn.microsoft.com/en-us/library/ms633574(VS.85).aspx"&gt;&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;CS_DBLCLKS&lt;/span&gt;&lt;/a&gt; style of your &lt;a href="http://msdn.microsoft.com/en-us/library/ms633574(VS.85).aspx"&gt;&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;WNDCLASS&lt;/span&gt;&lt;/a&gt; structure when you do a &lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;RegisterClass()&lt;/span&gt;. Without this your window will &lt;span style="text-decoration: underline;"&gt;not&lt;/span&gt; recieve the double click message.&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;/div&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Comic Sans MS;"&gt;If you are comfortable with the gesture api's, which Windows Mobile 6.5 supports, then you could use the &lt;a href="http://msdn.microsoft.com/en-us/library/ee220942.aspx"&gt;&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;GID_HOLD&lt;/span&gt;&lt;/a&gt; message. This message is sent when the user taps and holds on the screen for a specified amount of time.&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;/div&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Comic Sans MS;"&gt;When my main window recieves a &lt;a href="http://msdn.microsoft.com/en-us/library/aa926302.aspx"&gt;&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;WM_LBUTTONDBLCLK&lt;/span&gt;&lt;/a&gt; message, I call the following function:&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;span style="font-family: Verdana; color: rgb(51, 153, 102);"&gt;//error checking omitted on purpose&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;POPUP_ITEMS pi[] = {&lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;    {IDM_POPUP_ABOUT, TEXT("About")},&lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;    {IDM_POPUP_EXIT, TEXT("Exit")}&lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;};&lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;int ShowContextMenu(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)&lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;{&lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;    POINT pt;&lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;    pt.x = LOWORD(lParam);&lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;    pt.y = HIWORD(lParam);&lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;    ClientToScreen(hWnd, &amp;amp;pt);&lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;    HMENU hMenu = CreatePopupMenu();&lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;    for (int i=0; i&amp;lt; sizeof(pi)/sizeof(pi[0]); i++)&lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;    {&lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;        InsertMenu(hMenu, 0xFFFFFFFF, MF_BYPOSITION | MF_STRING | MF_ENABLED, pi[i].id, pi[i].szText);&lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;    }&lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;    return TrackPopupMenu(hMenu, TPM_LEFTALIGN | TPM_TOPALIGN | TPM_RETURNCMD, pt.x, pt.y, 0, hWnd, NULL);&lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;}&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;span style="font-family: Comic Sans MS;"&gt;The &lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;POPUP_ITEMS&lt;/span&gt; structure is defined to hold an integer and a string,&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;typedef struct _popup_items_&lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;{&lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;    int id;&lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;    TCHAR szText[128];&lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;} POPUP_ITEMS;&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Comic Sans MS;"&gt;In the function, I first get the client co-ordinates of the point where the user double clicked and convert them to Screen co-ordinates. &lt;a href="http://msdn.microsoft.com/en-us/library/aa932177.aspx"&gt;&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;TrackPopupMenu()&lt;/span&gt;&lt;/a&gt; api, which displays the popup menu, expects the co-ordinates to be passed w.r.t the screen.&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;/div&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Comic Sans MS;"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa925887.aspx"&gt;&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;CreatePopupMenu()&lt;/span&gt;&lt;/a&gt; creates an empty menu. Use &lt;a href="http://msdn.microsoft.com/en-us/library/aa920776.aspx"&gt;&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;InsertMenu()&lt;/span&gt;&lt;/a&gt; api to add items into the menu and &lt;a href="http://msdn.microsoft.com/en-us/library/aa932177.aspx"&gt;&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;TrackPopupMenu()&lt;/span&gt;&lt;/a&gt; will display the popup menu.&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;/div&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Comic Sans MS;"&gt;When you set &lt;a href="http://msdn.microsoft.com/en-us/library/aa932177.aspx"&gt;&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;TPM_RETURNCMD&lt;/span&gt;&lt;/a&gt; flag in the call to &lt;a href="msdn.microsoft.com/en-us/library/aa932177.aspx"&gt;&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;TrackPopupMenu()&lt;/span&gt;&lt;/a&gt;, the function will return with the identifier of the menu item which the user selected. If the user clicks outside, without selecting anything, then the function simply returns zero. These functions are simple to use and the MSDN documentation will suffice. I have provided links to msdn above.&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;/div&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Comic Sans MS;"&gt;Finally, here is the video,&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;/div&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;br /&gt;
&lt;object height="344" width="425"&gt;
&lt;param name="movie" value="http://www.youtube.com/v/OZm9v5d5JPk&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;" /&gt;
&lt;param name="allowFullScreen" value="true" /&gt;
&lt;param name="allowscriptaccess" value="always" /&gt;&lt;embed height="344" width="425" src="http://www.youtube.com/v/OZm9v5d5JPk&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=136258"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=136258" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/TechTwaddle/aggbug/136258.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>TechTwaddle</dc:creator>
            <guid>http://geekswithblogs.net/TechTwaddle/archive/2009/11/13/displaying-a-context-menu-in-your-application.aspx</guid>
            <pubDate>Fri, 13 Nov 2009 07:26:08 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/TechTwaddle/comments/136258.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/TechTwaddle/archive/2009/11/13/displaying-a-context-menu-in-your-application.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/TechTwaddle/comments/commentRss/136258.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/TechTwaddle/services/trackbacks/136258.aspx</trackback:ping>
        </item>
        <item>
            <title>How to change the text of a softkey menu?</title>
            <category>General</category>
            <link>http://geekswithblogs.net/TechTwaddle/archive/2009/11/09/how-to-change-the-text-of-a-softkey-menu.aspx</link>
            <description>&lt;div style="FONT-FAMILY: Comic Sans MS; TEXT-ALIGN: justify"&gt;To change the text of a softkey menu item, all you have to do is pretend that they are buttons. Well, they are specialized buttons in any case. So in order to change its property (in this case the 'text') you will have to use the &lt;span style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa932118.aspx"&gt;TBBUTTONINFO&lt;/a&gt;&lt;/span&gt; structure along with &lt;span style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa929014.aspx"&gt;TB_GETBUTTONINFO&lt;/a&gt;&lt;/span&gt; and &lt;span style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa920744.aspx"&gt;TB_SETBUTTONINFO&lt;/a&gt;&lt;/span&gt; messages. Lets dive into the code:&lt;br /&gt;
&lt;/div&gt;
&lt;br style="FONT-FAMILY: Comic Sans MS" /&gt;
&lt;span style="FONT-FAMILY: Comic Sans MS"&gt;Note: Error checking is omitted for obvious reasons.&lt;/span&gt;&lt;br style="FONT-FAMILY: Comic Sans MS" /&gt;
&lt;br style="FONT-FAMILY: Comic Sans MS" /&gt;
&lt;span style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana"&gt;    TCHAR szText[128] = TEXT("");&lt;/span&gt;&lt;br style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana" /&gt;
&lt;span style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana"&gt;    TBBUTTONINFO tbi;&lt;/span&gt;&lt;br style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana" /&gt;
&lt;span style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana"&gt;    ZeroMemory(&amp;amp;tbi, sizeof(tbi));&lt;/span&gt;&lt;br style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana" /&gt;
&lt;br style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana" /&gt;
&lt;span style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana"&gt;    tbi.cbSize = sizeof(tbi);&lt;/span&gt;&lt;br style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana" /&gt;
&lt;span style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana"&gt;    tbi.dwMask = TBIF_TEXT | TBIF_COMMAND;&lt;/span&gt;&lt;br style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana" /&gt;
&lt;span style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana"&gt;    tbi.pszText = szText;&lt;/span&gt;&lt;br style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana" /&gt;
&lt;span style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana"&gt;    tbi.cchText = sizeof(szText);&lt;/span&gt;&lt;br style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana" /&gt;
&lt;span style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana"&gt;    tbi.idCommand = IDM_MARK_UNMARK;&lt;/span&gt;&lt;br style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana" /&gt;
&lt;br style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana" /&gt;
&lt;span style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana"&gt;    SendMessage(g_hWndMenuBar, TB_GETBUTTONINFO, (WPARAM)IDM_MARK_UNMARK, (LPARAM)&amp;amp;tbi);&lt;/span&gt;&lt;br style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana" /&gt;
&lt;br style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana" /&gt;
&lt;span style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana"&gt;    if (!wcscmp(szText, L"Mark"))&lt;/span&gt;&lt;br style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana" /&gt;
&lt;span style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana"&gt;    {&lt;/span&gt;&lt;br style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana" /&gt;
&lt;span style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana"&gt;        wcscpy(szText, L"Unmark");&lt;/span&gt;&lt;br style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana" /&gt;
&lt;span style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana"&gt;    }&lt;/span&gt;&lt;br style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana" /&gt;
&lt;span style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana"&gt;    else&lt;/span&gt;&lt;br style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana" /&gt;
&lt;span style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana"&gt;    {&lt;/span&gt;&lt;br style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana" /&gt;
&lt;span style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana"&gt;        wcscpy(szText, L"Mark");&lt;/span&gt;&lt;br style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana" /&gt;
&lt;span style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana"&gt;    }&lt;/span&gt;&lt;br style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana" /&gt;
&lt;br style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana" /&gt;
&lt;span style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana"&gt;    SendMessage(g_hWndMenuBar, TB_SETBUTTONINFO, (WPARAM)IDM_MARK_UNMARK, (LPARAM)&amp;amp;tbi);&lt;/span&gt;&lt;br style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana" /&gt;
&lt;br style="FONT-FAMILY: Comic Sans MS" /&gt;
&lt;div style="FONT-FAMILY: Comic Sans MS; TEXT-ALIGN: justify"&gt;So we fill up the &lt;span style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa932118.aspx"&gt;TBBUTTONINFO&lt;/a&gt;&lt;/span&gt; structure and then send &lt;span style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa929014.aspx"&gt;TB_GETBUTTONINFO&lt;/a&gt;&lt;/span&gt; message to the menu bar. After this call returns, &lt;span style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana"&gt;szText&lt;/span&gt; will contain the text of the menu item. We switch the contents of &lt;span style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana"&gt;szText&lt;/span&gt; and then send a &lt;span style="COLOR: rgb(0,0,128); FONT-FAMILY: Verdana"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa920744.aspx"&gt;TB_SETBUTTONINFO&lt;/a&gt;&lt;/span&gt; message. And the text on the menu item changes.&lt;br /&gt;
&lt;/div&gt;
&lt;br style="FONT-FAMILY: Comic Sans MS" /&gt;
&lt;div style="FONT-FAMILY: Comic Sans MS; TEXT-ALIGN: justify"&gt;Couple of seasons back I was working on an application which let the user "Mark" and "Unmark" dates on a calendar control. It was for a smartphone, so I thought this technique is quite handy and just qualifies for a post.&lt;br /&gt;
&lt;/div&gt;
&lt;br style="FONT-FAMILY: Comic Sans MS" /&gt;
&lt;span style="FONT-FAMILY: Comic Sans MS"&gt;Here is a video of it in action,&lt;/span&gt;&lt;br style="FONT-FAMILY: Comic Sans MS" /&gt;
&lt;br /&gt;
&lt;br style="FONT-FAMILY: Comic Sans MS" /&gt;
&lt;br /&gt;
&lt;embed src="http://www.youtube.com/v/fnjAB_KFij0&amp;amp;hl=en&amp;amp;fs=1&amp;amp;" width="425" height="344" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always"&gt;&lt;/embed&gt;&lt;br /&gt;
&lt;br /&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=136147"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=136147" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/TechTwaddle/aggbug/136147.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>TechTwaddle</dc:creator>
            <guid>http://geekswithblogs.net/TechTwaddle/archive/2009/11/09/how-to-change-the-text-of-a-softkey-menu.aspx</guid>
            <pubDate>Mon, 09 Nov 2009 06:34:59 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/TechTwaddle/comments/136147.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/TechTwaddle/archive/2009/11/09/how-to-change-the-text-of-a-softkey-menu.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/TechTwaddle/comments/commentRss/136147.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/TechTwaddle/services/trackbacks/136147.aspx</trackback:ping>
        </item>
        <item>
            <title>Project Resistance for Windows Mobile and iPhone</title>
            <category>General</category>
            <link>http://geekswithblogs.net/TechTwaddle/archive/2009/10/27/project-resistance-for-windows-mobile-and-iphone.aspx</link>
            <description>&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Comic Sans MS;"&gt;&lt;a href="http://blog.opennetcf.com/ctacke/default.aspx"&gt;Chris Tacke&lt;/a&gt; has undertaken "&lt;a href="http://resistance.codeplex.com/"&gt;Project Resistance&lt;/a&gt;" and gives great insight on developing and deploying an application onto the Marketplace. Project Resistance is a simple utility application that allows the user to play with resistor color bands. Selecting a color band combination gives you the resistance in ohms and given a resistance in ohms it will show you the corresponding color band. You can follow and get more details &lt;a href="http://blog.opennetcf.com/ctacke/2009/10/22/ProjectResistanceDay1.aspx"&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;/div&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Comic Sans MS;"&gt;Another interesting thing is that &lt;a href="http://www.christec.co.nz/"&gt;Chris Tec&lt;/a&gt; is developing the same application for iPhone. This is great because, first, I don't know much about developing for iPhone, except that Objective-C looks weird, and second, it lets you compare the two platforms and find out how difficult or easy it is to get something done. You can get more details &lt;a href="http://www.christec.co.nz/blog/archives/834"&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;/div&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Comic Sans MS;"&gt;Here is an excerpt from Chris Tec's blog to give you an idea:&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;/div&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Comic Sans MS;"&gt;"&lt;span style="font-style: italic; color: rgb(0, 51, 0);"&gt;Unlike the Windows Mobile application which required a small amount of plumbing code to be developed in order to draw images with alpha transparency I was simply able to drag and drop the images onto my view within Interface Builder. The Cocoa Touch framework supports controls with transparency out of the box.&lt;/span&gt;"&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
!&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=135761"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=135761" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/TechTwaddle/aggbug/135761.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>TechTwaddle</dc:creator>
            <guid>http://geekswithblogs.net/TechTwaddle/archive/2009/10/27/project-resistance-for-windows-mobile-and-iphone.aspx</guid>
            <pubDate>Wed, 28 Oct 2009 03:02:02 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/TechTwaddle/comments/135761.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/TechTwaddle/archive/2009/10/27/project-resistance-for-windows-mobile-and-iphone.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/TechTwaddle/comments/commentRss/135761.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/TechTwaddle/services/trackbacks/135761.aspx</trackback:ping>
        </item>
        <item>
            <title>Applications: Minesweeper approaches completion, slowly but steadily</title>
            <category>Applications</category>
            <link>http://geekswithblogs.net/TechTwaddle/archive/2009/10/25/applications-minesweeper-approaches-completion-slowly-but-steadily.aspx</link>
            <description>&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Comic Sans MS;"&gt;So this weekend I got some time to push Minesweeper forward. You can now play a full game. Now that the basic game is up and running work needs to be done on other aspects. For now, here is a couple of clips:&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/THoAk41-QCA&amp;amp;hl=en&amp;amp;fs=1&amp;amp;" /&gt;&lt;param name="allowFullScreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;embed src="http://www.youtube.com/v/THoAk41-QCA&amp;amp;hl=en&amp;amp;fs=1&amp;amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: Comic Sans MS;"&gt;and,&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;

&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/cA1BL30wnSI&amp;amp;hl=en&amp;amp;fs=1&amp;amp;" /&gt;&lt;param name="allowFullScreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;embed src="http://www.youtube.com/v/cA1BL30wnSI&amp;amp;hl=en&amp;amp;fs=1&amp;amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=135702"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=135702" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/TechTwaddle/aggbug/135702.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>TechTwaddle</dc:creator>
            <guid>http://geekswithblogs.net/TechTwaddle/archive/2009/10/25/applications-minesweeper-approaches-completion-slowly-but-steadily.aspx</guid>
            <pubDate>Sun, 25 Oct 2009 12:02:12 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/TechTwaddle/comments/135702.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/TechTwaddle/archive/2009/10/25/applications-minesweeper-approaches-completion-slowly-but-steadily.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/TechTwaddle/comments/commentRss/135702.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/TechTwaddle/services/trackbacks/135702.aspx</trackback:ping>
        </item>
        <item>
            <title>Applications: Getting device information (embedded exe, rapi and more)</title>
            <category>Applications</category>
            <link>http://geekswithblogs.net/TechTwaddle/archive/2009/10/22/applications-getting-device-information-embedded-exe-rapi-and-more.aspx</link>
            <description>&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Comic Sans MS;"&gt;I was working on this application which runs on the PC and gets information about the windows mobile device which is connected to the PC over active sync. Now there are a couple of ways in which you can do this:&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;/div&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Comic Sans MS;"&gt;1) Create a PC app which gets all the information using RAPI api's and displays it.&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;/div&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Comic Sans MS;"&gt;2) Create two binaries, one for the PC and one for the WinMob device. The PC app launches the WinMob app remotely using RAPI API's, the WinMob app runs and writes all the information it can gather into a file on the device. The PC app then remotely reads this file and displays it to the user. The let down is that you need to create/maintain two binaries but the advantage is that you are not limited to the RAPI api's, all device API's are at your disposal.&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;/div&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Comic Sans MS;"&gt;3) Create a PC app which uses the &lt;a href="geekswithblogs.net/TechTwaddle/archive/2009/10/16/how-to-embed-an-exe-inside-another-exe-as-a.aspx"&gt;embedded exe approach&lt;/a&gt;. This is a bit loony but works (; And yes, this is what I used in my app.&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;/div&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Comic Sans MS;"&gt;Let me digress here for people who do not know about &lt;a href="http://msdn.microsoft.com/en-us/library/bb737283.aspx"&gt;RapiConfig.exe&lt;/a&gt;. RapiConfig is tool that ships with the Windows Mobile SDK's and can be used to test out CSP's (Configuration Service Provider) by using provisioning XML's. RapiConfig works over Active Sync. So basically you run this tool from command line like:&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;/div&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;C:\&amp;gt;RapiConfig /P config.xml&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;span style="font-family: Comic Sans MS;"&gt;This command has the same effect as calling &lt;a href="http://msdn.microsoft.com/en-us/library/bb158518.aspx"&gt;&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;DMProcessConfigXML()&lt;/span&gt;&lt;/a&gt; API on the device with config.xml's contents.&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Comic Sans MS;"&gt;And then I came across the &lt;a href="http://msdn.microsoft.com/en-us/library/bb737683.aspx"&gt;DeviceInformation CSP&lt;/a&gt;. The DeviceInformation service provider, as the name gives it away, provides information about the device and it can also be used to set information but we won't go into that. So you give this service provider an XML like this:&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;/div&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;&amp;lt;wap-provisioningdoc&amp;gt;&lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;    &amp;lt;characteristic type="DeviceInformation"&amp;gt;&lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;       &amp;lt;parm-query name="OperatingSystem" /&amp;gt; &lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;       &amp;lt;parm-query name="OperatingSystemVersion" /&amp;gt; &lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;       &amp;lt;parm-query name="Product" /&amp;gt; &lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;       &amp;lt;parm-query name="ProductVersion" /&amp;gt; &lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;    &amp;lt;/characteristic&amp;gt;&lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;&amp;lt;/wap-provisioningdoc&amp;gt;&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;span style="font-family: Comic Sans MS;"&gt;and it spits out the response like this:&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;&amp;lt;wap-provisioningdoc&amp;gt;&lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;    &amp;lt;characteristic type="DeviceInformation"&amp;gt;&lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;        &amp;lt;parm name="OperatingSystem" value="Microsoft Windows CE"/&amp;gt;&lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;        &amp;lt;parm name="OperatingSystemVersion" value="Version 5.2 (Build 1235)"/&amp;gt;&lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;        &amp;lt;parm name="Product" value="Windows Mobile® 6 Standard"/&amp;gt;&lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;        &amp;lt;parm name="ProductVersion" value="CE OS 5.2.1235 (Build 17740.0.2.0)"/&amp;gt;&lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;    &amp;lt;/characteristic&amp;gt;&lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;&amp;lt;/wap-provisioningdoc&amp;gt;&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Comic Sans MS;"&gt;So while developing this application I thought I could use some of RapiConfig. I shouldn't have to write everything from scratch. I'll just find out the SDK installation directory on the PC somehow, run this tool with my xml, parse the output xml and display it. But wait, what if the PC does not have the SDK installed. This simple application can't depend on that. And that is when I had this crazy idea of embedding RapiConfig.exe within my application (; I wrote up a small test app to find out if this approach would even work. It did. You can get the details here in my &lt;a href="geekswithblogs.net/TechTwaddle/archive/2009/10/16/how-to-embed-an-exe-inside-another-exe-as-a.aspx"&gt;previous post&lt;/a&gt;.&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;/div&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Comic Sans MS;"&gt;So thats the way it works. The application first extracts the embedded RapiConfig exe and the xml file into the current directory where the app is running from. Then it runs RapiConfig passing it the extracted xml. After RapiConfig completes executing and terminates, it creates a &lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;RapiConfigOut.xml&lt;/span&gt; in the same directory. The application opens this output xml, parses it and displays the information to the user.&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;/div&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Comic Sans MS;"&gt;If no device is connected then RapiConfig keeps waiting for the device to connect. To prevent this I used a few RAPI api's in my application to find out if a device is connected using Active Sync, and only if it is, I launch RapiConfig exe. Otherwise, I display a message saying "Please make sure the device is connected.. blah bla"&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;/div&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;span style="font-family: Comic Sans MS;"&gt;A few points worth jotting down&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;span style="font-family: Comic Sans MS;"&gt;(*) After extracting the RapiConfig exe, I was calling &lt;a href="http://msdn.microsoft.com/en-us/library/ms682425(VS.85).aspx"&gt;&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;CreateProcess()&lt;/span&gt;&lt;/a&gt; on it to launch it:&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;wsprintf(lpCmdLine, L"/P %s", XML_FILENAME);&lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;ret = CreateProcess(EXE_FILENAME, lpCmdLine, NULL, NULL, TRUE, 0, NULL, NULL, &amp;amp;sui, &amp;amp;pi);&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Comic Sans MS;"&gt;But this didn't work for me. The output XML was the exact same as the input xml, without any data. Launching the same extracted exe from command line worked! How was this possible? I tried a couple of things with SECURITY_ATTRIBUTES, inheriting handles etc but none worked. The documentation for &lt;a href="http://msdn.microsoft.com/en-us/library/ms682425(VS.85).aspx"&gt;&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;CreateProcess()&lt;/span&gt;&lt;/a&gt; mentioned that the first parameter to it maybe be &lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;NULL&lt;/span&gt;, in that case &lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;lpCmdLine&lt;/span&gt; parameter should include the exe name. And when I gave this a try, it worked! So now you call &lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;CreateProcess()&lt;/span&gt; like below:&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;/div&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;wsprintf(lpCmdLine, L"%s /P %s", EXE_FILENAME, XML_FILENAME);&lt;/span&gt;&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;ret = CreateProcess(NULL, lpCmdLine, NULL, NULL, FALSE, 0, NULL, NULL, &amp;amp;sui, &amp;amp;pi);&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Comic Sans MS;"&gt;(*) Some while back I had tried to fiddle with &lt;a href="http://msdn.microsoft.com/en-us/library/aa920274.aspx"&gt;RAPI&lt;/a&gt;. I had tried to launch an exe on device remotely from the PC. But it didn't work. Turns out I was calling &lt;a href="http://msdn.microsoft.com/en-us/library/aa922061.aspx"&gt;&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;CeRapiInit()&lt;/span&gt;&lt;/a&gt; incorrectly. I was calling it directly, not on any object but actually you need to call it on the &lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;IRapiSession&lt;/span&gt; interface. I should really be reading the documentation carefully before jumping to the code (;&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;/div&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;span style="font-family: Comic Sans MS;"&gt;Here are a few snapshots of the application, this is with craddled emulator.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;img height="538" width="456" src="/images/geekswithblogs_net/TechTwaddle/DeviceInformation/DevInfo_startScreen.JPG" alt="" /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;img height="542" width="615" src="/images/geekswithblogs_net/TechTwaddle/DeviceInformation/DevInfo_error.JPG" alt="" /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;img height="540" width="458" src="/images/geekswithblogs_net/TechTwaddle/DeviceInformation/DevInfo_info1.JPG" alt="" /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;img height="538" width="457" src="/images/geekswithblogs_net/TechTwaddle/DeviceInformation/DevInfo_info2.JPG" alt="" /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Comic Sans MS;"&gt;Oh and the DeviceInformation doesn't give you the resolution of the device. I used &lt;a href="http://msdn.microsoft.com/en-us/library/aa918985.aspx"&gt;CeGetSystemMetrics()&lt;/a&gt; to get that part of information. And if there is any other details that you would want on this app, please leave a comment.&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;span style="font-family: Comic Sans MS;"&gt;Good day!&lt;/span&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=135671"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=135671" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/TechTwaddle/aggbug/135671.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>TechTwaddle</dc:creator>
            <guid>http://geekswithblogs.net/TechTwaddle/archive/2009/10/22/applications-getting-device-information-embedded-exe-rapi-and-more.aspx</guid>
            <pubDate>Fri, 23 Oct 2009 04:09:03 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/TechTwaddle/comments/135671.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/TechTwaddle/archive/2009/10/22/applications-getting-device-information-embedded-exe-rapi-and-more.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/TechTwaddle/comments/commentRss/135671.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/TechTwaddle/services/trackbacks/135671.aspx</trackback:ping>
        </item>
        <item>
            <title>Applications: Appending text to a multiline Edit control</title>
            <category>Applications</category>
            <link>http://geekswithblogs.net/TechTwaddle/archive/2009/10/21/applications-appending-text-to-a-multiline-edit-control.aspx</link>
            <description>&lt;div style="text-align: justify; font-family: Comic Sans MS;"&gt;Today I was developing a small utility application where I needed to append some text to a multiline edit control. When I ran through the list of Edit control messages, I could not find any that could be used to append text. &lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;WM_SETTEXT&lt;/span&gt; was overwriting the previous contents. And doing a &lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;WM_GETTEXT&lt;/span&gt; first, appending to it and then &lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;WM_SETTEXT&lt;/span&gt; seemed like an overkill.&lt;br /&gt;
&lt;/div&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;div style="text-align: justify; font-family: Comic Sans MS;"&gt;A little bit of searching led me to &lt;a href="http://msdn.microsoft.com/en-us/library/aa929135.aspx"&gt;&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;EM_REPLACESEL&lt;/span&gt;&lt;/a&gt; message. This message is used to replace the currently selected text in the edit control with the specified text but there's a bit more to it. If there is no selected text in the edit control then the specified text is inserted at the current caret position. Since what I was using was a read-only edit control this works for me but I am not sure if it will work in all cases. I wonder if we need a &lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;SETCARETPOS&lt;/span&gt; message. So anyways, here's how to append text in an edit control:&lt;br /&gt;
&lt;/div&gt;
&lt;br style="font-family: Comic Sans MS;" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;HWND hWndEdit = GetDlgItem(g_hDlg, IDC_EDIT_BOX);&lt;/span&gt;&lt;br /&gt;
&lt;br style="font-family: Verdana; color: rgb(0, 0, 128);" /&gt;
&lt;span style="font-family: Verdana; color: rgb(0, 0, 128);"&gt;SendMessage(hWndEdit, EM_REPLACESEL, (WPARAM)FALSE, (LPARAM)str);&lt;/span&gt;&lt;br style="font-family: Comic Sans MS;" /&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=135615"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=135615" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/TechTwaddle/aggbug/135615.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>TechTwaddle</dc:creator>
            <guid>http://geekswithblogs.net/TechTwaddle/archive/2009/10/21/applications-appending-text-to-a-multiline-edit-control.aspx</guid>
            <pubDate>Wed, 21 Oct 2009 05:46:29 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/TechTwaddle/comments/135615.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/TechTwaddle/archive/2009/10/21/applications-appending-text-to-a-multiline-edit-control.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/TechTwaddle/comments/commentRss/135615.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/TechTwaddle/services/trackbacks/135615.aspx</trackback:ping>
        </item>
    </channel>
</rss>