Presentation is loading. Please wait.

Presentation is loading. Please wait.

Konstantin Kosinsky Architect Microsoft Innovation Center Blog:

Similar presentations


Presentation on theme: "Konstantin Kosinsky Architect Microsoft Innovation Center Blog:"— Presentation transcript:

1 Konstantin Kosinsky Architect Microsoft Innovation Center Blog: http://dev.net.ua/blogs/kosinsky

2 Few Changes: Most software that runs on Windows Vista will run on Windows 7 - exceptions will be low level code (AV, Firewall, Imaging, etc). Hardware that runs Windows Vista well will run Windows 7 well. Windows 7 Few Changes: Focus on quality and reliability improvements Deep Changes: New models for security, drivers, deployment, and networking

3 Decrease Increase

4 Keep idle and stay idle Минимизация работающих процессов и задач Минимизация фоновых процессов +10% CPU => +1.25W +1.25W => -8.3% battery

5

6 Trigger-Started Services Timer Coalescing

7

8 Консолидация: Панели быстро запуска Области нотификации Иконок рабочего стола Запущенных приложений RunningRunning Not running Multiple windows + hover ActiveActive

9 ApplicationID Это строка, а не GUID Ограничение в 128 символов Соглашение по именованиб - Company.Product.SubProduct.Version По умолчанию: Имя процесса Необходимость модификации: Несколько процессов, одно приложение Один исполняемый файл, много приложений

10 На уровне процесса - действует на все окна: #include #include #pragma comment (lib, "shell32.lib") SetCurrentProcessExplicitAppUserModelId( L"Microsoft.Samples.AppId1"); #include #include #pragma comment (lib, "shell32.lib") SetCurrentProcessExplicitAppUserModelId( L"Microsoft.Samples.AppId1"); Windows7Application.SetCurrentProcessAppId("Microsoft.Samples.AppId1");Windows7Application.SetCurrentProcessAppId("Microsoft.Samples.AppId1");

11 PROPVARIANT pv; InitPropVariantFromString( L"Microsoft.Samples.AppId2", &pv); IPropertyStore *pps; HRESULT hr = SHGetPropertyStoreForWindow( hWnd, IID_PPV_ARGS(&pps)); pps->SetValue(PKEY_AppUserModel_ID, pv); PROPVARIANT pv; InitPropVariantFromString( L"Microsoft.Samples.AppId2", &pv); IPropertyStore *pps; HRESULT hr = SHGetPropertyStoreForWindow( hWnd, IID_PPV_ARGS(&pps)); pps->SetValue(PKEY_AppUserModel_ID, pv); myForm.SetAppId("Microsoft.Samples.AppId2");myForm.SetAppId("Microsoft.Samples.AppId2");

12 Destinations (“nouns”) Tasks (“verbs”) Known categories Custom categories User Tasks Taskbar Tasks Pinned category

13 Ассоциируем приложение с расширение файлов Используем common file dialogs Используем recent document API SHAddToRecentDocs(SHARDW_PATH, "file.ext"); RH.RegisterFileAssociations(...); OpenFileDialog ofd =...; ofd.ShowDialog(); JumpListManager jlm =...; jlm.AddToRecent("file.ext");RH.RegisterFileAssociations(...); OpenFileDialog ofd =...; ofd.ShowDialog(); JumpListManager jlm =...; jlm.AddToRecent("file.ext");

14 IObjectCollection* poc =...; IShellLink* task =...; poc.AddObject(task); ICustomDestinationList* pcdl =...; pcdl.BeginList(...); IObjectArray* poa =... poc; pcdl.AddUserTasks(poa);pcdl.CommitList(); IObjectCollection* poc =...; IShellLink* task =...; poc.AddObject(task); ICustomDestinationList* pcdl =...; pcdl.BeginList(...); IObjectArray* poa =... poc; pcdl.AddUserTasks(poa);pcdl.CommitList(); JumpListManager jlm =...; jlm.AddTask(new ShellLink { Path=...,... }); JumpListManager jlm =...; jlm.AddTask(new ShellLink { Path=...,... });

15 IObjectCollection* poc =...; IShellItem* item =...; poc.AddObject(item); ICustomDestinationList* pcdl =...; pcdl.BeginList(...); IObjectArray* poa =... poc; pcdl.AppendCategory(L"Sales", poa); pcdl.CommitList(); IObjectCollection* poc =...; IShellItem* item =...; poc.AddObject(item); ICustomDestinationList* pcdl =...; pcdl.BeginList(...); IObjectArray* poa =... poc; pcdl.AppendCategory(L"Sales", poa); pcdl.CommitList(); JumpListManager jlm =...; jlm.AddCustomDestination( new ShellItem { Path=..., Category=... }); new ShellItem { Path=..., Category=... }); JumpListManager jlm =...; jlm.AddCustomDestination( new ShellItem { Path=..., Category=... }); new ShellItem { Path=..., Category=... });

16 Управление приложением с панели задач

17 UINT wm_tbc = RegisterWindowMessage( "TaskbarButtonCreated"); MSG m; GetMessage(..., &m); if (m.message == wm_tbc) { ITaskbarList3* ptl =...; ITaskbarList3* ptl =...; THUMBBUTTON btn = {...}; THUMBBUTTON btn = {...}; ptl->ThumbBarAddButtons(m.hWnd, 1, &btn); ptl->ThumbBarAddButtons(m.hWnd, 1, &btn);} UINT wm_tbc = RegisterWindowMessage( "TaskbarButtonCreated"); MSG m; GetMessage(..., &m); if (m.message == wm_tbc) { ITaskbarList3* ptl =...; ITaskbarList3* ptl =...; THUMBBUTTON btn = {...}; THUMBBUTTON btn = {...}; ptl->ThumbBarAddButtons(m.hWnd, 1, &btn); ptl->ThumbBarAddButtons(m.hWnd, 1, &btn);} ThumbButtonManager tbm =...; tbm.CreateThumbButton(...).Clicked +=...; ThumbButtonManager tbm =...; tbm.CreateThumbButton(...).Clicked +=...;

18 Область уведомлений теперь контролируется пользователем Используйте кнопки панели задача для отображения прогресса и уведомлений

19 ITaskbarList3* ptl =...; ptl->SetOverlayIcon( hwnd, hicon, L"Accessible Description"); hwnd, hicon, L"Accessible Description"); ptl->SetProgressState(hwnd, TBPF_NORMAL); for (int i = 0; i < MAX; ++i) { ptl->SetProgressValue(hwnd, i, MAX); ptl->SetProgressValue(hwnd, i, MAX);} ITaskbarList3* ptl =...; ptl->SetOverlayIcon( hwnd, hicon, L"Accessible Description"); hwnd, hicon, L"Accessible Description"); ptl->SetProgressState(hwnd, TBPF_NORMAL); for (int i = 0; i < MAX; ++i) { ptl->SetProgressValue(hwnd, i, MAX); ptl->SetProgressValue(hwnd, i, MAX);} myForm.SetTaskbarOverlayIcon(icon, "..."); ProgressBar pb =...; pb.SetTaskbarProgress(); myForm.SetTaskbarOverlayIcon(icon, "..."); ProgressBar pb =...; pb.SetTaskbarProgress();

20

21 DwmSetWindowAttribute(...,DWMWA_HAS_ICONIC_BITMAP,...);...,DWMWA_HAS_ICONIC_BITMAP,...);DwmSetWindowAttribute(...,DWMWA_FORCE_ICONIC_REPRESENTATION,...); /* in the WndProc */ case WM_DWMSENDICONICTHUMBNAIL: HBITMAP hbm =...; HBITMAP hbm =...; DwmSetIconicThumbnail(hwnd, hbm,...); DwmSetIconicThumbnail(hwnd, hbm,...);DwmSetWindowAttribute(...,DWMWA_HAS_ICONIC_BITMAP,...);...,DWMWA_HAS_ICONIC_BITMAP,...);DwmSetWindowAttribute(...,DWMWA_FORCE_ICONIC_REPRESENTATION,...); /* in the WndProc */ case WM_DWMSENDICONICTHUMBNAIL: HBITMAP hbm =...; HBITMAP hbm =...; DwmSetIconicThumbnail(hwnd, hbm,...); DwmSetIconicThumbnail(hwnd, hbm,...); CustomWindowsManager cwm =...; cwm.ThumbnailRequested += (o,e)=>e.Bitmap=b; CustomWindowsManager cwm =...; cwm.ThumbnailRequested += (o,e)=>e.Bitmap=b;

22

23 Application Menu Quick Access Toolbar Tab Contextual Tab Set Contextual Tab Help Group (aka “Chunk”) Dialog Launcher

24 Microsoft’s Ribbon Strategy MFCMFCScenicScenicWPFWPF Target: Managed Target: Managed Target: MFC native Target: MFC native Target: Native Target: Native Needs.NET 3.5 SP1 Win2K or newer Vista or newer Office 2007 & Windows styles Office 2007 & Windows styles 1 Windows visual style Official release in 2009 Available now in Visual Studio 2008 SP1 Coming soon… Ships with Windows 7 Coming soon… Ships with Windows 7

25

26 Hardware Software Consumers

27 Multi-Touch Controls Multi-Touch API Surface Multi-Touch Controls & API Surface Multi-Touch Controls & API Multi-Touch API Multi-Touch API and Controls

28 GoodBetterBest APIs Panning/zoom gestures Right click gesture Gesture notifications Pan/zoom/rotate Raw touch data Manipulation and Inertia processors Native Win32 Controls with standard scrollbars WM_GESTURE message WM_TOUCH COM based Manipulation and Inertia Processors WPFWPF 4.0 pan support in ScrollViewer Gesture events Inertia configuration Touch events Manipulation and Inertia Processors WinFormsControls with standard scrollbars WM_GESTURE message P/Invoke Manipulation and Inertia Processors in Microsoft.Ink.DLL Real-time Stylus or Ink Collector

29

30 PowerShell v2 Сенсоры и географическое местоположение Federated Search и Библиотеки XPS (Xml Paper Specification) BITS(Background Intelligent Transfer Service) Обновленная работа с фоновыми процессами Графическая подсистема UAC ………….

31 Скачать и пройти: Windows 7 Training Kit Windows 2008 R2 Training Kit Скачать и установить Visual Studio 2010 Beta 2 http://channel9.msdn.com/learn

32


Download ppt "Konstantin Kosinsky Architect Microsoft Innovation Center Blog:"

Similar presentations


Ads by Google