高惠杰合作伙伴技術支工程師合作伙伴支持部微軟全球技術支_第1頁
高惠杰合作伙伴技術支工程師合作伙伴支持部微軟全球技術支_第2頁
高惠杰合作伙伴技術支工程師合作伙伴支持部微軟全球技術支_第3頁
高惠杰合作伙伴技術支工程師合作伙伴支持部微軟全球技術支_第4頁
已閱讀5頁,還剩52頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

1、高惠杰合作伙伴技術支工程師合作伙伴支持部微軟全球技術支持中心 大中華區(qū)Windows Mobile原生代碼開發(fā)的新功能我們將會討論的新功能Softkeys - 軟鍵State and Notification Broker - 狀態(tài)提醒Sound - 聲音設置Imaging - 圖像操作POOM - Pocket Outlook 對象模型GPS 全球定位系統(tǒng)Messaging 消息應用程序ActiveSync 同步控制Picture Picker 圖像選擇器Contact Picker 聯(lián)系人選擇器ExitWindowsEx 重新啟動QueryPolicy 安全策略查詢GetDeviceUni

2、queID 得到設備標識我們不會討論的新功能DirectDraw / Direct3D請參見用 DirectX 開發(fā) Windows Mobile 游戲Windows Media Player請參見Windows CE 5.0 的多媒體技術SQL Server CE / SQL Server Mobile請參見SQL CE 的演進 - SQL Server 2005 移動版托管應用程序開發(fā)請參見Windows Mobile 5.0 中新的托管代碼API以及控件 Visual Studio 2005, MFC, ATL請參見在VS .NET 2005 中移動智能設備開發(fā) 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 - 狀態(tài)提醒通過統(tǒng)一的方式來提供設備狀態(tài)的提醒功能典型的提醒功能電話未接來點電話狀態(tài) 來電顯示信息網絡連接狀況WiFi, GPRS, 調制解調器,通過桌面電腦日程表當前的約會即將到來的約會典型的提醒功能通信提醒未閱讀的E-mail、短消息數量其他提醒顯示方向(橫向、縱向)放入同步架中可以由ISV自定義擴展SnAp

7、i.h中的各種狀態(tài)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 狀態(tài)提醒如何注冊pid = PIMPR_FOLDERNOTIFICATIONS;propval.val.ulVal = PIMFOLDERNOTIFICATION_LOCAL

22、| PIMFOLDERNOTIFICATION_REMOTE;pItemFolder-SetProps(0, 1, &propval);SDK中的例子: CalendarView如何注冊SDK中的例子: CalendarViewPOOM 狀態(tài)提醒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;聯(lián)系人自定義屬性GPS 全球定位系統(tǒng)GpsApi.h核心函數調用:GPSOpenDevice()GPSCloseDevice()GPSGetPosition()GPSGetDeviceState()GPS 全球定位系統(tǒng)#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 聯(lián)系人選擇器Contact Picker 聯(lián)系人選擇器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. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論