Medical History
This code sample is named Medical History. It demonstrates how to add named properties to a Windows Mobile Contact item, and how to add menu extensions to a Contact summary card.
Feature Area
Relevant APIs
- IContextMenu interface
- IItem::GetProps method
- IItem::Save method
- IItem::SetProps method
- IObjectWithSite interface
- IPOutlookApp::Logon method
- IPOutlookApp2::GetIDsFromNames method
- IPOutlookApp2::GetIDsFromNames method
- IPOutlookApp2::GetItemFromOidEx method
Usage
To run the code sample
Navigate to the solution file (*.sln), and double-click it. By default, the solution file is copied to the following folder:
C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Samples\CPP\Win32\Medicalhistory\``MedicalHistory.sln
Microsoft Visual Studio 2005 launches and loads the solution.
Build the solution (Ctrl+Shift+B).
Deploy the solution (F5).
After you build this code sample, you can configure Visual Studio 2005 to debug it remotely on the mobile device by following these steps.
To debug this project
- In Visual Studio, right-click the MedicalHistory project in Solution Explorer, and then click Properties.
- Expand Configuration Properties, and click Debugging.
- In Debugger to launch:, select Smart Device Native Debugger.
- In Remote Executable, type "\Windows\poutlook.exe".
- In Command Arguments, type contacts.
- Click OK to save your changes.
- Press F5 to begin debugging.
To use the application
- Open a contact's summary card.
- Click Menu, then click Medical History.
Remarks
These menu extensions allow the user to add medical information to a Contact item. This includes the contact's health insurance provider, blood group, blood pressure, and allergies.
Requirements
Pocket PC SDK: Windows Mobile 5.0 Pocket PC SDK.
Smartphone SDK: Windows Mobile 5.0 Smartphone SDK.
Development Environment: Visual Studio 2005.
ActiveSync: Version 4.0.
See Also
Code Samples | Menu Overview | How to: Register a File System Shortcut Menu | Registration Format for Application Shortcut Menu Extensions | Context Menu Extension Handler
Send Feedback on this topic to the authors