Case Study: Smoked by Windows Phone, Speaker — David Webster (Microsoft)
Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.
-
date post
15-Jan-2016 -
Category
Documents
-
view
222 -
download
0
Transcript of Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.
![Page 1: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/1.jpg)
Microsoft Smartphone Microsoft Smartphone 2002 Development2002 Development
Chung WebsterChung Webster
ConsultantConsultant
Microsoft Developer ServicesMicrosoft Developer Services
![Page 2: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/2.jpg)
AgendaAgenda
Smartphone HardwareSmartphone Hardware Smartphone OSSmartphone OS Smartphone User InterfaceSmartphone User Interface Development ToolsDevelopment Tools Application Security & DeploymentApplication Security & Deployment Working with TelephonyWorking with Telephony .NET Compact Framework.NET Compact Framework
![Page 3: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/3.jpg)
Smartphone 2002 Smartphone 2002 HardwareHardware 120MHz ARM processor120MHz ARM processor
16MB RAM for application 16MB RAM for application execution and temporary execution and temporary storagestorage
32MB flash ROM for OS and 32MB flash ROM for OS and permanent data storagepermanent data storage
176x220 16-bit colour display176x220 16-bit colour display
![Page 4: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/4.jpg)
Storage and MemoryStorage and Memory
ROM (~24MB)ROM (~24MB) Permanent content from Microsoft, OEM, and Permanent content from Microsoft, OEM, and
Operator provided applications.Operator provided applications. Can be updated over-the-air.Can be updated over-the-air.
Flash (~8MB)Flash (~8MB) Permanent data storage for application data, Permanent data storage for application data,
registry, and files, and databases.registry, and files, and databases. Survives power loss, reboots, etc.Survives power loss, reboots, etc.
RAM (~16MB)RAM (~16MB) Application execution and radio.Application execution and radio. Cleared on power off and reboot.Cleared on power off and reboot.
![Page 5: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/5.jpg)
Smartphone 2002 OSSmartphone 2002 OS
LogicConnectionManager
ToolkitSyncEngine
TAPI SIM WAP SMSCore APIs
GSM SIMRadio Stack CDMA
Apps / UI DiallerControlPanel
HomeScreen
Inbox
Threading Networking Winsock CryptoAPICE 3.0
![Page 6: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/6.jpg)
Not S
upp
orte
d
Not Recommended
New Controls
Sup
porte
d
WinCE ControlsWinCE Controls
CheckBoxCheckBox DatePickerDatePicker EditEdit HeaderHeader ListboxListbox ListviewListview ProgressProgress ScrollbarScrollbar StaticStatic StatusStatus TrackbarTrackbar TreeviewTreeview
ButtonsButtons Radio ButtonsRadio Buttons
Combo boxCombo box Month CalendarMonth Calendar Property Property
Sheets/PagesSheets/Pages ToolbarToolbar
Expandable EditExpandable Edit Multi-Item PickerMulti-Item Picker
![Page 7: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/7.jpg)
Smartphone User Smartphone User InterfaceInterface Form factor require control changesForm factor require control changes
MenusMenus Multiline Text EditMultiline Text Edit ListboxesListboxes Stylus / SIP InputStylus / SIP Input
SoftkeysSoftkeys
Expandable EditExpandable Edit
SpinnersSpinners
Input ModesInput Modes
![Page 8: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/8.jpg)
SoftkeysSoftkeys
Left softkey is most common actionLeft softkey is most common action Right softkey is a menuRight softkey is a menu
Items are listed in desktop-style orderItems are listed in desktop-style order Items never have ellipses (…)Items never have ellipses (…)
Dialogs have “Done” on the left softkey Dialogs have “Done” on the left softkey and “Cancel” on the right (if necessary)and “Cancel” on the right (if necessary)
![Page 9: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/9.jpg)
Edit ControlsEdit Controls
Edit controls support multiple input Edit controls support multiple input methodsmethods Typically the methods available will be numeric, Typically the methods available will be numeric,
multi-tap, and T9multi-tap, and T9
Multi-line edit controls support zooming in Multi-line edit controls support zooming in for a larger viewfor a larger view
![Page 10: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/10.jpg)
Spinner ControlSpinner Control
Replaces combo boxes, radio Replaces combo boxes, radio buttons, and list boxesbuttons, and list boxes
Multi-item selection availableMulti-item selection available
![Page 11: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/11.jpg)
Typical Application FlowTypical Application Flow
List view -> card view -> edit viewList view -> card view -> edit view Contacts is a classic exampleContacts is a classic example
![Page 12: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/12.jpg)
Development ToolsDevelopment Tools
eMbedded Visual C++ 3.0eMbedded Visual C++ 3.0 Smartphone 2002 SDKSmartphone 2002 SDK EmulatorEmulator No MFC / ATLNo MFC / ATL No eVBNo eVB Remote ToolsRemote Tools
Registry ViewerRegistry Viewer Process ViewerProcess Viewer File ViewerFile Viewer
![Page 13: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/13.jpg)
Useful Code SamplesUseful Code Samples
![Page 14: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/14.jpg)
Finding the Persistent Storage Finding the Persistent Storage PathPath To persist data, it must be stored in the To persist data, it must be stored in the
registry or under in persistent storage registry or under in persistent storage directorydirectory
Use SHGetSpecialFolderPath() for root pathUse SHGetSpecialFolderPath() for root path CSIDL_APPDATA\<appname> for files internal to CSIDL_APPDATA\<appname> for files internal to
your appyour app CSIDL_PERSONAL for files the user needs to work CSIDL_PERSONAL for files the user needs to work
with (“My Documents”)with (“My Documents”)
Data stored in RAM file system will be lost Data stored in RAM file system will be lost on power offon power off
![Page 15: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/15.jpg)
Finding the Persistent Storage Finding the Persistent Storage PathPath
TCHAR szVolumeFile[MAX_PATH];TCHAR szVolumeFile[MAX_PATH];
if(!SHGetSpecialFolderPath(NULL, szVolumeFile, if(!SHGetSpecialFolderPath(NULL, szVolumeFile, CSIDL_APPDATA, TRUE))CSIDL_APPDATA, TRUE))
{{ASSERT(FALSE);ASSERT(FALSE);
hr = HRESULT_FROM_WIN32(GetLastError());hr = HRESULT_FROM_WIN32(GetLastError());
return 0;return 0;
}}
// szVolumeFile - \IPSM\Application Data// szVolumeFile - \IPSM\Application Data
![Page 16: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/16.jpg)
Creating Softkeys and Handling Creating Softkeys and Handling BackBack
Softkeys are just PocketPC menu Softkeys are just PocketPC menu bars that only have two itemsbars that only have two items
Send a message to the menu bar to Send a message to the menu bar to request messages for the back keyrequest messages for the back key
![Page 17: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/17.jpg)
Creating Softkeys and Handling Creating Softkeys and Handling BackBack#define TPC#define TPC
//Create a MenuBar//Create a MenuBarSHMENUBARINFO mbi;SHMENUBARINFO mbi;memset(&mbi, 0, sizeof(SHMENUBARINFO));memset(&mbi, 0, sizeof(SHMENUBARINFO));mbi.cbSize = sizeof(SHMENUBARINFO);mbi.cbSize = sizeof(SHMENUBARINFO);mbi.hwndParent = hParent;mbi.hwndParent = hParent;mbi.nToolBarId = IDM_MAIN_MENU;mbi.nToolBarId = IDM_MAIN_MENU;mbi.hInstRes = g_hInst;mbi.hInstRes = g_hInst;mbi.nBmpId = 0;mbi.nBmpId = 0;mbi.cBmpImages = 0;mbi.cBmpImages = 0;
// Create the menu bar// Create the menu barif (!SHCreateMenuBar(&mbi))if (!SHCreateMenuBar(&mbi)){{
MessageBox(hParent, TEXT("SHCreateMenuBar Failed"), MessageBox(hParent, TEXT("SHCreateMenuBar Failed"), TEXT("Error"), MB_OK);TEXT("Error"), MB_OK);return false;return false;
}}
![Page 18: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/18.jpg)
Creating Softkeys and Handling BackCreating Softkeys and Handling Back
// Request notifications for the back key// Request notifications for the back keySendMessage(mbi.hwndMB, SHCMBM_OVERRIDEKEY, VK_TBACK, SendMessage(mbi.hwndMB, SHCMBM_OVERRIDEKEY, VK_TBACK,
MAKELPARAM(SHMBOF_NODEFAULT | SHMBOF_NOTIFY, SHMBOF_NODEFAULT MAKELPARAM(SHMBOF_NODEFAULT | SHMBOF_NOTIFY, SHMBOF_NODEFAULT | SHMBOF_NOTIFY));| SHMBOF_NOTIFY));
![Page 19: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/19.jpg)
Creating Softkeys and Handling Creating Softkeys and Handling BackBack// Handle the back key in the main window proc// Handle the back key in the main window procLRESULT CALLBACK MainWndProc(HWND hWnd, UINT uMessage, WPARAM LRESULT CALLBACK MainWndProc(HWND hWnd, UINT uMessage, WPARAM
wParam, LPARAM lParam)wParam, LPARAM lParam){{
switch (uMessage)switch (uMessage){{
……case WM_HOTKEY:case WM_HOTKEY:{{if((VK_TBACK == HIWORD(lParam))if((VK_TBACK == HIWORD(lParam)) {{ // Send back key to control with focus// Send back key to control with focus SHSendBackToFocusWindow(message, wParam, lParam);SHSendBackToFocusWindow(message, wParam, lParam); }}}}
}}}}
![Page 20: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/20.jpg)
Voice Calls ExampleVoice Calls Example
#include <phone.h>#include <phone.h>
PHONEMAKECALLINFO mci;PHONEMAKECALLINFO mci;int result;int result;
memset(&mci, 0, sizeof(mci));memset(&mci, 0, sizeof(mci));mci.cbSize = sizeof(mci);mci.cbSize = sizeof(mci);mci.dwFlags = PMCF_PROMPTBEFORECALLING;mci.dwFlags = PMCF_PROMPTBEFORECALLING;mci.pszDestAddress = TEXT(“+18005551212");mci.pszDestAddress = TEXT(“+18005551212");
result = PhoneMakeCall(mci);result = PhoneMakeCall(mci);if (result != 0)if (result != 0){{ // Insert error handling code here// Insert error handling code here}}
![Page 21: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/21.jpg)
Changing Input ModesChanging Input Modes
//Set input mode to multitap //Set input mode to multitap SendDlgItemMessage(hDlg, IDC_CONTROL, EM_SETINPUTMODE, 0, SendDlgItemMessage(hDlg, IDC_CONTROL, EM_SETINPUTMODE, 0,
EIM_SPELL);EIM_SPELL);
//Set input mode to numeric//Set input mode to numericSendDlgItemMessage(hDlg, IDC_CONTROL, EM_SETINPUTMODE, 0, SendDlgItemMessage(hDlg, IDC_CONTROL, EM_SETINPUTMODE, 0,
EIM_NUMBERS);EIM_NUMBERS);
//Set input mode to T9//Set input mode to T9SendDlgItemMessage(hDlg, IDC_CONTROL, EM_SETINPUTMODE, 0, SendDlgItemMessage(hDlg, IDC_CONTROL, EM_SETINPUTMODE, 0,
EIM_AMBIG);EIM_AMBIG);
//Set input mode to multitap //Set input mode to multitap SendDlgItemMessage(hDlg, IDC_CONTROL, EM_SETINPUTMODE, 0, SendDlgItemMessage(hDlg, IDC_CONTROL, EM_SETINPUTMODE, 0,
EIM_SPELL);EIM_SPELL);
//Set input mode to numeric//Set input mode to numericSendDlgItemMessage(hDlg, IDC_CONTROL, EM_SETINPUTMODE, 0, SendDlgItemMessage(hDlg, IDC_CONTROL, EM_SETINPUTMODE, 0,
EIM_NUMBERS);EIM_NUMBERS);
//Set input mode to T9//Set input mode to T9SendDlgItemMessage(hDlg, IDC_CONTROL, EM_SETINPUTMODE, 0, SendDlgItemMessage(hDlg, IDC_CONTROL, EM_SETINPUTMODE, 0,
EIM_AMBIG);EIM_AMBIG);
![Page 22: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/22.jpg)
Dialler AppDialler App
Introduction to TelephonyIntroduction to Telephony
![Page 23: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/23.jpg)
Application Security and Application Security and DeploymentDeployment
![Page 24: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/24.jpg)
Locked device 2Locked device 2
Any ExeAny Exe Any CabAny Cab
Smartphone SecuritySmartphone Security
Devices can be configured by the Devices can be configured by the operatoroperator
Unlocked deviceUnlocked device
Any ExeAny Exe Any CabAny Cab
Locked device 1Locked device 1
Signed ExeSigned Exe Signed CabSigned Cab
Any ExeAny Exe Any CabAny CabSigned ExeSigned Exe Signed CabSigned Cab
Trusted ExeTrusted Exe Trusted CabTrusted Cab
![Page 25: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/25.jpg)
Application Management Application Management ExecutionExecution
Two modes of executionTwo modes of execution Unprivileged – has access to most Unprivileged – has access to most
APIs, registry keys, and filesAPIs, registry keys, and files Privileged – has access to Privileged – has access to
everythingeverything Modes allow operators to Modes allow operators to
protect sensitive areas of the protect sensitive areas of the device and networkdevice and network
![Page 26: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/26.jpg)
Application Management Application Management ExecutionExecution
When do you need privileged?When do you need privileged? Inbox pluginsInbox plugins Intercept SMS messagesIntercept SMS messages Device driversDevice drivers
How do you get privileged?How do you get privileged? On a test device: sign with a test On a test device: sign with a test
certcert On a shipping device: get signed On a shipping device: get signed
with an operator certwith an operator cert
![Page 27: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/27.jpg)
Debugging ApplicationsDebugging Applications
To debug against device need to To debug against device need to sign files and provision device for sign files and provision device for cert.cert.
![Page 28: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/28.jpg)
Packaging ProcessPackaging Process
Create a CAB file using CABWizSP Create a CAB file using CABWizSP under the SDK \Tools directoryunder the SDK \Tools directory
Create an INF file detailing application and Create an INF file detailing application and company details, files to copy, shortcut company details, files to copy, shortcut creationcreation
Application Application Package (.CAB)Package (.CAB)
Your FilesYour Files
CABWizSPCABWizSP
Information File (.inf)Information File (.inf)
![Page 29: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/29.jpg)
Packaging ProcessPackaging Process
To enable security signed applicationsTo enable security signed applications Sign the Exe and Cab using Signcode.exeSign the Exe and Cab using Signcode.exe
Application Application Package (.CAB)Package (.CAB)
Your FilesYour Files
CABWizSPCABWizSP
Information File (.inf)Information File (.inf)
![Page 30: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/30.jpg)
Application Management Application Management DistributionDistribution
Choose a channel to distribute your Choose a channel to distribute your applicationapplication Use Mobile2Market to increase distribution Use Mobile2Market to increase distribution
channelschannels http://www.microsoft.com/mobile/developer/developerhttp://www.microsoft.com/mobile/developer/developer
programs/mobile2market/default.aspprograms/mobile2market/default.asp
Choose a transport to distribute your Choose a transport to distribute your applicationapplication Pocket Internet ExplorerPocket Internet Explorer Email attachmentEmail attachment Storage cardStorage card ActiveSyncActiveSync
![Page 31: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/31.jpg)
Create a PackageCreate a Package
![Page 32: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/32.jpg)
Smartphone FuturesSmartphone Futures
Microsoft are committed to the Microsoft are committed to the platformplatform
V. Next releaseV. Next release Based on Win CE 4.2Based on Win CE 4.2 Compact Framework 1.0 in ROMCompact Framework 1.0 in ROM ATL SupportATL Support JIT DebuggingJIT Debugging RTTI / Exception HandlingRTTI / Exception Handling
![Page 33: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/33.jpg)
.NET Compact Framework .NET Compact Framework 1.0 For Smartphone1.0 For Smartphone
Will be a feature of next version of SmartphoneWill be a feature of next version of Smartphone New UI SupportNew UI Support ROM - only – no CAB Install of FrameworkROM - only – no CAB Install of Framework Managed apps follow native security modelManaged apps follow native security model Added support for 5 new languagesAdded support for 5 new languages
Dutch, Danish, Swedish, Portuguese Brasilia, UK English Dutch, Danish, Swedish, Portuguese Brasilia, UK English Multilingual User Interface (MUI) SupportMultilingual User Interface (MUI) Support
Entire v1 feature set supportedEntire v1 feature set supported
SQL Server CE not supportedSQL Server CE not supported
![Page 34: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/34.jpg)
NETCF Supported ControlsNETCF Supported ControlsPocket PC and Windows CE.NETPocket PC and Windows CE.NET
ButtonButtonCheckBoxCheckBoxComboBoxComboBoxContextMenuContextMenuDataGridDataGridDomainUpDownDomainUpDownFileOpenDialogFileOpenDialogHScrollBarHScrollBarImageListImageListLabelLabelListBoxListBoxListViewListViewTreeView TreeView FileSaveDialog FileSaveDialog
Supported controlsSupported controls
MainMenuMainMenuNumericUpDownNumericUpDownPanelPanelPictureBoxPictureBoxProgressBarProgressBarRadioButtonRadioButtonStatusBarStatusBarTabControlTabControlTextBoxTextBoxTimerTimerToolBarToolBarVScrollBarVScrollBarMessageBoxMessageBoxFormForm
![Page 35: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/35.jpg)
NETCF Supported ControlsNETCF Supported ControlsSmartphoneSmartphone
ButtonCheckBoxCheckBoxComboBoxComboBoxContextMenuDataGridDomainUpDownFileOpenDialogHScrollBarHScrollBarImageListImageListLabelLabelListBoxListViewListViewTreeViewTreeView FileSaveDialog
Supported controlsSupported controlsMainMenuMainMenuNumericUpDownPanelPanelPictureBoxPictureBoxProgressBarProgressBarRadioButtonStatusBarTabControlTextBoxTextBoxTimerTimerToolBarVScrollBarVScrollBarMessageBoxMessageBoxFormForm
![Page 36: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/36.jpg)
Smartphone ControlsSmartphone Controls
TextBoxTextBox .Multiline = True: MLE Control.Multiline = True: MLE Control .Multiline = False: Edit Control.Multiline = False: Edit Control
![Page 37: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/37.jpg)
Smartphone ControlsSmartphone Controls
ComboBoxComboBox Action to view all items full screenAction to view all items full screen
![Page 38: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/38.jpg)
Smartphone ControlsSmartphone Controls
TreeViewTreeView Recommended Full ScreenRecommended Full Screen No CheckBoxes on SmartphoneNo CheckBoxes on Smartphone
ListViewListView Recommended Full ScreenRecommended Full Screen
![Page 39: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/39.jpg)
Soft Keys (Menus)Soft Keys (Menus)
Left SoftKey can not have menu itemsLeft SoftKey can not have menu items If there is no MainMenu on the formIf there is no MainMenu on the form
SoftKey press raises KeyDown and SoftKey press raises KeyDown and KeyUp eventsKeyUp events
KeyEventArgs.KeyCode is Keys.F1 and F2KeyEventArgs.KeyCode is Keys.F1 and F2
![Page 40: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/40.jpg)
Home KeyHome Key
Home Key returns to home screen Home Key returns to home screen No KeyPress event thrown No KeyPress event thrown
So Home Key can’t be overriddenSo Home Key can’t be overridden
![Page 41: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/41.jpg)
Back KeyBack Key
Back Key navigates back to previous screenBack Key navigates back to previous screen Next window in z - order brought to frontNext window in z - order brought to front
ExceptionsExceptions Always cancels out of modal dialogsAlways cancels out of modal dialogs Backspace when focus on TextboxBackspace when focus on Textbox When menu showing cancels out of menuWhen menu showing cancels out of menu
Overriding Default BehaviorOverriding Default Behavior Set KeyPressEventArgs.Handled = true Set KeyPressEventArgs.Handled = true Intended for custom controls or gamesIntended for custom controls or games
![Page 42: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/42.jpg)
Control Focus And Control Focus And TabbingTabbing Focus is critical to Smartphone UI modelFocus is critical to Smartphone UI model
Up and Down navigation keys switch between controlsUp and Down navigation keys switch between controls Focusable ControlsFocusable Controls
CheckBox, ComboBox, ListView, TreeView, Form, CheckBox, ComboBox, ListView, TreeView, Form, TextBoxTextBox
Tab order goes in order of focusable controls in Tab order goes in order of focusable controls in controls collection controls collection
Custom ControlsCustom Controls Focusable unless Enabled property set to falseFocusable unless Enabled property set to false Developer must ‘tab out’ of their control by overriding Developer must ‘tab out’ of their control by overriding
the the up/down keys and giving focus to next controlup/down keys and giving focus to next control
Designer IssueDesigner Issue Designer adds controls to code in reverse orderDesigner adds controls to code in reverse order
![Page 43: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/43.jpg)
Security And Managed Security And Managed CodeCode .NET Compact Framework adapts .NET Compact Framework adapts
native application-level security modelnative application-level security model Managed apps follow native security Managed apps follow native security
policypolicy Security check also done on P/Invoke callSecurity check also done on P/Invoke call
Application must be signed with Application must be signed with carrier approved cert to run on locked carrier approved cert to run on locked devicesdevices
Code Access Security will come in .NET Code Access Security will come in .NET Compact Framework 2.0Compact Framework 2.0 More granular security, unique to .NETMore granular security, unique to .NET
![Page 44: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/44.jpg)
Application ArchitectureApplication Architecture
ApplicationApplicationEngineEngine
Utility Utility LibrariesLibraries
User User InterfaceInterface
ApplicationApplicationEngineEngine
Utility Utility LibrariesLibraries
Pocket PC Pocket PC UIUI
Smartphone Smartphone UIUI
Applies to Native and NETCF codeApplies to Native and NETCF code
![Page 45: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/45.jpg)
Smartphone Developer Smartphone Developer KitKit Exclusive to MSPP Exclusive to MSPP
members (members (~550~550€)€) eVT 3.0eVT 3.0 Smartphone 2002 Smartphone 2002
SDKSDK DocumentationDocumentation WhitepapersWhitepapers SamplesSamples
Compal AR11Compal AR11 SIM UnlockedSIM Unlocked Security UnlockedSecurity Unlocked
![Page 46: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/46.jpg)
SummarySummary
eVC++ 3.0 to target Smartphone eVC++ 3.0 to target Smartphone 20022002
Design your user interfaceDesign your user interface Left menubar is default actionLeft menubar is default action SpinnersSpinners Expandable EditsExpandable Edits Keep as simple as possibleKeep as simple as possible
Your application may need signingYour application may need signing Compact Framework is comingCompact Framework is coming
![Page 47: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/47.jpg)
Remember To Fill Out Remember To Fill Out This Session’s Evaluation! This Session’s Evaluation!
![Page 48: Microsoft Smartphone 2002 Development Chung Webster Consultant Microsoft Developer Services.](https://reader036.fdocuments.us/reader036/viewer/2022062409/56649d585503460f94a381f7/html5/thumbnails/48.jpg)