高惠杰合作伙伴技术支工程师合作伙伴支持部微软全球技术支_第1页
高惠杰合作伙伴技术支工程师合作伙伴支持部微软全球技术支_第2页
高惠杰合作伙伴技术支工程师合作伙伴支持部微软全球技术支_第3页
高惠杰合作伙伴技术支工程师合作伙伴支持部微软全球技术支_第4页
已阅读5页,还剩52页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、高惠杰合作伙伴技术支工程师合作伙伴支持部微软全球技术支持中心 大中华区Windows Mobile原生代码开发的新功能我们将会讨论的新功能Softkeys - 软键State and Notification Broker - 状态提醒Sound - 声音设置Imaging - 图像操作POOM - Pocket Outlook 对象模型GPS 全球定位系统Messaging 消息应用程序ActiveSync 同步控制Picture Picker 图像选择器Contact Picker 联系人选择器ExitWindowsEx 重新启动QueryPolicy 安全策略查询GetDeviceUni

2、queID 得到设备标识我们不会讨论的新功能DirectDraw / Direct3D请参见用 DirectX 开发 Windows Mobile 游戏Windows Media Player请参见Windows CE 5.0 的多媒体技术SQL Server CE / SQL Server Mobile请参见SQL CE 的演进 - SQL Server 2005 移动版托管应用程序开发请参见Windows Mobile 5.0 中新的托管代码API以及控件 Visual Studio 2005, MFC, ATL请参见在VS .NET 2005 中移动智能设备开发 Pocket PC So

3、ftKeys - 软键SHCreateMenuBar原有的 Command BarsIDR_MYAPP_CMDBAR RCDATABEGIN IDR_MAIN_MENU, 2, I_IMAGENONE, IDM_DRAW, TBSTATE_ENABLED, TBSTYLE_BUTTON | TBSTYLE_AUTOSIZE, IDS_DRAW, 0, NOMENU, I_IMAGENONE, 0, TBSTATE_ENABLED, TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, IDS_MENU, 0, 0,END原有的 Command BarsIDR_MYAPP_C

4、MDBAR RCDATABEGIN IDR_MAIN_MENU, 2, I_IMAGENONE, IDM_DRAW, TBSTATE_ENABLED, TBSTYLE_BUTTON | TBSTYLE_AUTOSIZE, IDS_DRAW, 0, NOMENU, I_IMAGENONE, 0, TBSTATE_ENABLED, TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, IDS_MENU, 0, 0,ENDXSoftkeys 软键SHCMBF_HMENUcbi.dwFlags = SHCMBF_HMENU;cbi.nToolBarId = IDM_MYMENU;S

5、HCreateMenuBar(&cbi);Visual StudioIDR_MYAPP_CMDBAR RCDATABEGIN IDR_MAIN_MENU, 2, I_IMAGENONE, IDM_DRAW, TBSTATE_ENABLED, TBSTYLE_BUTTON | TBSTYLE_AUTOSIZE, IDS_DRAW, 0, NOMENU, I_IMAGENONE, 0, TBSTATE_ENABLED, TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, IDS_MENU, 0, 0,ENDVisual Studio启用/禁用软键SHEnableSoftkey

6、(HWND hwndMenuBar, UINT uid, / command id or index BOOL bByIndex, BOOL bEnable);SDK中的例子: ShellApiDemoSoftKey 演示程序State And Notification Broker - 状态提醒通过统一的方式来提供设备状态的提醒功能典型的提醒功能电话未接来点电话状态 来电显示信息网络连接状况WiFi, GPRS, 调制解调器,通过桌面电脑日程表当前的约会即将到来的约会典型的提醒功能通信提醒未阅读的E-mail、短消息数量其他提醒显示方向(横向、纵向)放入同步架中可以由ISV自定义扩展SnAp

7、i.h中的各种状态ActiveApplicationDisplayRotationKeyboardPresentCradlePresentCameraPresentMessagingSmsUnreadMessagingMmsUnreadMessagingVoiceMailTotalUnreadMessagingVoiceMail1UnreadMessagingVoiceMail2UnreadMessagingActiveSyncEmailUnreadMessagingTotalEmailUnreadMessagingOtherEmailUnreadMessagingLastEmailAccou

8、ntNameMessagingSmsAccountNameMessagingMmsAccountNameMessagingActiveSyncAccountNameTasksActiveTasksHighPriorityTasksDueTodayTasksOverdueCalendarNextAppointmentSubjectCalendarNextAppointmentLocationCalendarNextAppointmentStartCalendarNextAppointmentEndMediaPlayerAlbumArtistMediaPlayerTrackBitrateMedia

9、PlayerTrackTitleMediaPlayerAlbumTitleMediaPlayerTrackArtistMediaPlayerTrackNumberMediaPlayerTrackGenreMediaPlayerTrackTimeElapsedPowerBatteryStrengthPowerBatteryStatePowerBatteryBackupStrengthPowerBatteryBackupStateTimeDatePhoneSignalStrengthPhoneOperatorNamePhoneTalkingCallerNamePhoneActiveCallCoun

10、tPhoneProfileNamePhoneProfilePhoneCellBroadcastCalendarNextAppointmentHasConflictOwnerNameOwnerPhoneNumberOwnerEmailOwnerNotesActiveSyncStatusPhoneMissedCallsHeadsetPresentCarKitPresentSpeakerPhoneActivePhoneMultiLinePhoneSimFullPhoneNoSimPhoneInvalidSimPhoneBlockedSimPhoneRadioOffPhoneRadioPresentP

11、honeRingerOffPhoneLine1SelectedPhoneLine2SelectedPhoneRoamingPhoneCallForwardingOnLine1PhoneMissedCallPhoneActiveDataCallPhoneCallBarringPhoneCallOnHoldPhoneConferenceCallPhoneIncomingCallPhoneCallCallingPhoneGprsCoveragePhoneNoServicePhoneSearchingForServicePhoneHomeServicePhone1xRttCoveragePhoneCa

12、llTalkingPhoneCallForwardingOnLine2CalendarNextAppointmentCalendarNextAppointmentBusyStatusCalendarNextAppointmentCategoriesCalendarAppointmentCalendarAppointmentSubjectCalendarAppointmentLocationCalendarAppointmentStartTimeCalendarAppointmentEndTimeCalendarAppointmentHasConflictCalendarAppointmentB

13、usyStatusCalendarAppointmentCategoriesCalendarHomeScreenAppointmentCalendarHomeScreenAppointmentSubjectCalendarHomeScreenAppointmentLocationCalendarHomeScreenAppointmentStartTimeCalendarHomeScreenAppointmentEndTimeCalendarHomeScreenAppointmentHasConflictCalendarHomeScreenAppointmentBusyStatusCalenda

14、rHomeScreenAppointmentCategoriesPhoneIncomingCallerNamePhoneLastIncomingCallerNamePhoneIncomingCallerNumberPhoneLastIncomingCallerNumberPhoneIncomingCallerContactPropertyNamePhoneLastIncomingCallerContactPropertyNamePhoneIncomingCallerContactPropertyIDPhoneLastIncomingCallerContactPropertyIDPhoneInc

15、omingCallerContactPhoneLastIncomingCallerContactPhoneTalkingCallerNumberPhoneTalkingCallerContactPropertyNamePhoneTalkingCallerContactPropertyIDPhoneTalkingCallerContactConnectionsCountConnectionsBluetoothCountConnectionsBluetoothDescriptionsConnectionsCellularCountConnectionsCellularDescriptionsCon

16、nectionsNetworkCountConnectionsNetworkDescriptionsConnectionsNetworkAdaptersConnectionsDesktopCountConnectionsDesktopDescriptionsConnectionsProxyCountConnectionsProxyDescriptionsConnectionsModemCountConnectionsModemDescriptionsConnectionsUnknownCountConnectionsUnknownDescriptionsConnectionsVpnCountC

17、onnectionsVpnDescriptionsCalendarEventCalendarEventSubjectCalendarEventLocationCalendarEventStartTimeCalendarEventEndTimeCalendarEventHasConflictCalendarEventBusyStatusCalendarEventCategories如何与Broker进行交流注册表标准的Win32 注册表APIRegistryGetDWORD()RegistrySetDWORD()RegistrySetString()RegistryGetString()SDK中

18、的例子: SyncManagerTransient Notifications瞬时提醒仅当应用程序运行时产生提醒提醒方式Window Message 窗口消息CE Message Queue CE消息队列Callback 函数回调Transient Notifications瞬时提醒#include #include / 设置提醒句柄HREGNOTIFY hNotify = NULL;RegistryNotifyWindow(SN_PHONESIGNALSTRENGTH_ROOT, SN_PHONESIGNALSTRENGTH_PATH, SN_PHONESIGNALSTRENGTH_VALU

19、E, hWnd, WM_MY_WINDOW_MESSAGE, dwUserDefinedValue, NULL, &hNotify); Conditional Notifications条件提醒DWORD 条件运算符=, !=, , =, , , =, , =, contains, starts with, ends with对于二进制数据不提供条件提醒样例: Signal CreateImageFromFile( Lflower.jpg, &pImage) pImage-Draw(hdc, &rc, NULL); pImage-Release(); pImgFactory-Release()

20、;SDK中的例子: Imaging图像操作POOMPocket Outlook对象模型Custom Properties自定义属性Bulk Properties 同时处理大量属性NotificationsCategory listPOOM 自定义属性static const WCHAR * rgszPropNames = LHealthInsuranceProvider, LBloodType, LBloodPressure, LAllergies;CEPROPID rgPropIDs4 = 0;polApp-GetIDsFromNames (4, rgszPropNames, PIM_CRE

21、ATE | CEVT_LPWSTR, rgPropIDs);SDK中的例子: MedicalHistoryPOOM 同时处理大量属性CEPROPID rgPropIDs4 ;CEPROPVAL *pVals = NULL;pItem-GetProps(rgPropIDs, CEDB_ALLOWREALLOC, 4, &pVals, &cbBuffer, heap);SDK中的例子: MedicalHistoryPOOM 状态提醒如何注册pid = PIMPR_FOLDERNOTIFICATIONS;propval.val.ulVal = PIMFOLDERNOTIFICATION_LOCAL

22、| PIMFOLDERNOTIFICATION_REMOTE;pItemFolder-SetProps(0, 1, &propval);SDK中的例子: CalendarView如何注册SDK中的例子: CalendarViewPOOM 状态提醒IPOutlookApp2 *polApp;polApp-Logon(long)hWnd)LRESULT CALLBACK WndProc() switch (msg) case PIM_ITEM_CREATED_LOCAL:case PIM_ITEM_DELETED_LOCAL: case PIM_ITEM_CHANGED_LOCAL: case P

23、IM_ITEM_CREATED_REMOTE: case PIM_ITEM_DELETED_REMOTE: case PIM_ITEM_CHANGED_REMOTE:oid = wParam;olFolder = lParam;联系人自定义属性GPS 全球定位系统GpsApi.h核心函数调用:GPSOpenDevice()GPSCloseDevice()GPSGetPosition()GPSGetDeviceState()GPS 全球定位系统#include HANDLE h;GPS_POSITION pos;h = GPSOpenDevice (heventNewPos, heventDev

24、iceStateChange, NULL, 0);GPSGetPosition(h, &pos, 60000, 0);/ 得到 pos.dblLongitude, pos.dblLatitudeMessaging Application消息应用程序控制用户界面MailComposeMessageMailDisplayMessageMailSwitchToFolderMailSwitchToAccountMailSyncMessagesCeMapi.hActiveSync - 同步控制ActiveSyncStart()ActiveSyncStop()State and Notification

25、Broker: HKLMSystemStateActiveSyncSynchronizingNone = 0Synchronizing = 1Error = 2SDK中的例子: SyncManagerPicture Picker 图像选择器同时也支持视频Picture Picker 图像选择器OPENFILENAMEEX ofnex = 0;ofnex.lStructSize = sizeof(ofnex);ofnex.ExFlags = OFN_EXFLAG_THUMBNAILVIEW; ofnex.lpstrFile = new TCHAR MAX_PATH;ofnex.nMaxFile

26、= MAX_PATH;GetOpenFileNameEx(&ofnex);SDK中的例子: AddContactPicturePicture Picker 图像选择器通过摄像头拍摄通过摄像头拍摄typedef struct DWORD cbSize; HWND hwndOwner; TCHAR szFileMAX_PATH; LPCTSTR pszInitialDir; LPCTSTR pszDefaultFileName; LPCTSTR pszTitle; CAMERACAPTURE_STILLQUALITY StillQuality; CAMERACAPTURE_VIDEOTYPES V

27、ideoTypes; DWORD nResolutionWidth; DWORD nResolutionHeight; DWORD nVideoTimeLimit; CAMERACAPTURE_MODE Mode; SHCAMERACAPTURE;HRESULT SHCameraCapture (PSHCAMERACAPTURE *pshcc);SDK Sample: CECameraContact Picker 联系人选择器Contact Picker 联系人选择器IPOutlookApp2 pApp;IItem *pItem;CHOOSECONTACT cc = 0; cc.cbSize = sizeof (cc);cc.dwFlags = CCF_CHOOSECONTACTONLY;cc.hwndOwner = NULL;ChooseContact (&cc); pA

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论