O'Reilly logo

Professional Windows® Embedded Compact 7 by Thierry Joubert, David Jones, Samuel Phung

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

UPDATE THE SWE APPLICATION SUBPROJECT

In the previous section, the XAML_Hello Expression Blend project has been updated with an event handler added to the button control. The exercise in this section updates the SWE_Hello subproject with the change made to the XAML_Hello project using the Update Silverlight for Windows Embedded Project Wizard.

Work through the following steps to update the SWE_Hello subproject:

1. With the MySWE OS design active, from the VS2008 Solution Explorer, expand the SWE_Hello subproject under the \Subprojects folder.

2. Expand the \Resources files folder, and double-click the MainPage.xaml file.

3. From the VS2008 Tools menu, select Windows Embedded Silverlight Tools, and click Update Silverlight for Windows Embedded Project to launch this wizard and update the SWE_Hello subproject to reflect the change made to the XAML_Hello Expression Blend 3 project.

4. From the VS2008 Solution Explorer tab, expand the SWE_Hello subproject’s \Source files folder, and double-click on the MainPage.cpp file to open this file in the code editor window.

5. Search for the button_Click event handler, and add the MessageBox function to display a message box when this event is triggered, as follows:

image
HRESULT MainPage::button_Click (IXRDependencyObject* pSender, XRMouseButtonEventArgs* pArgs) { HRESULT hr = E_NOTIMPL; if ((NULL == pSender) || (NULL == pArgs)) { hr = E_INVALIDARG; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required