1 / 32

Разработка приложений для Windows 7

Разработка приложений для Windows 7. Konstantin Kosinsky Architect Microsoft Innovation Center Blog: http://dev.net.ua/blogs/kosinsky. Windows 7 построена на базе Windows Vista.

Download Presentation

Разработка приложений для Windows 7

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Разработка приложений для Windows 7 Konstantin Kosinsky Architect Microsoft Innovation Center Blog: http://dev.net.ua/blogs/kosinsky

  2. Windows 7 построена на базе Windows Vista • 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 SpeedFasterBoot Device Ready ResponsivenessStart menu, Taskbar Scale256 processors MemoryReference set, Graphics Disk I/ORegistry Reads, Indexer PowerDVD Playback, Panel, Timers

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

  5. Парковка ядер Core 0 Core 1 Core 0 Core 0 Core 0 Core 1 Core 1 Core 1 Socket 0 Socket 1 Нагрузка

  6. Что может сделать разработчик? • Trigger-Started Services • Timer Coalescing Timer tick 15.6 ms Vista Periodic Timer Events Windows 7

  7. Демо

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

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

  10. Управление Application Id • На уровне процесса - действует на все окна: #include <windows.h> #pragma comment (lib, "shell32.lib") SetCurrentProcessExplicitAppUserModelId( L"Microsoft.Samples.AppId1"); Windows7Application.SetCurrentProcessAppId( "Microsoft.Samples.AppId1");

  11. Application Id окна 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");

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

  13. УправлениеJump ListШаг 1: Ассоциируем тип файлов • Ассоциируем приложение с расширение файлов • Используем common file dialogs • Используем recent document API SHAddToRecentDocs(SHARDW_PATH, "file.ext"); RH.RegisterFileAssociations(...); OpenFileDialogofd = ...; ofd.ShowDialog(); JumpListManagerjlm = ...; jlm.AddToRecent("file.ext");

  14. УправлениеJump ListШаг 2: Добавляем задания IObjectCollection* poc = ...; IShellLink* task = ...; poc.AddObject(task); ICustomDestinationList* pcdl = ...; pcdl.BeginList(...); IObjectArray* poa = ... poc; pcdl.AddUserTasks(poa); pcdl.CommitList(); JumpListManagerjlm = ...; jlm.AddTask(new ShellLink { Path=..., ... });

  15. Управление Jump ListШаг 3: Добавляем категории IObjectCollection* poc = ...; IShellItem* item = ...; poc.AddObject(item); ICustomDestinationList* pcdl = ...; pcdl.BeginList(...); IObjectArray* poa = ... poc; pcdl.AppendCategory(L"Sales", poa); pcdl.CommitList(); JumpListManagerjlm = ...; jlm.AddCustomDestination( new ShellItem { Path=..., Category=... });

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

  17. Создание Thumbnail Toolbars UINT wm_tbc = RegisterWindowMessage( "TaskbarButtonCreated"); MSG m; GetMessage(..., &m); if (m.message == wm_tbc) { ITaskbarList3* ptl = ...; THUMBBUTTON btn = {...}; ptl->ThumbBarAddButtons(m.hWnd, 1, &btn); } ThumbButtonManagertbm = ...; tbm.CreateThumbButton(...).Clicked += ...;

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

  19. Прогресс и уведомления ITaskbarList3* ptl = ...; ptl->SetOverlayIcon( hwnd, hicon, L"Accessible Description"); ptl->SetProgressState(hwnd, TBPF_NORMAL); for (inti = 0; i < MAX; ++i) { ptl->SetProgressValue(hwnd, i, MAX); } myForm.SetTaskbarOverlayIcon(icon, "..."); ProgressBarpb = ...; pb.SetTaskbarProgress();

  20. Live Thumbnail Clip

  21. Управление Live Thumbnails DwmSetWindowAttribute( ...,DWMWA_HAS_ICONIC_BITMAP,...); DwmSetWindowAttribute( ...,DWMWA_FORCE_ICONIC_REPRESENTATION,...); /* in the WndProc */ case WM_DWMSENDICONICTHUMBNAIL: HBITMAP hbm = ...; DwmSetIconicThumbnail(hwnd, hbm, ...); CustomWindowsManagercwm = ...; cwm.ThumbnailRequested += (o,e)=>e.Bitmap=b;

  22. Демо

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

  24. Варианты ленточного интерфейса WPF MFC Scenic Target: Managed Target: MFC native Target: Native Needs .NET 3.5 SP1 Win2K or newer Vista or newer Office 2007 & Windows styles Office 2007 & Windows styles1 Windows visual style Official release in 2009 Available now in Visual Studio 2008 SP1 Coming soon… Ships with Windows 7 Microsoft’s Ribbon Strategy

  25. Демо

  26. Multi-touch Is Here! • Hardware • Software • Consumers

  27. Touch Development Roadmap Windows 7 Release NET 4.0 / Surface 2.0 Release Native Win32 Application WinFormsApplication WPF Application Surface Application Surface SDK 1.0 Surface SDK 2.0 Multi-Touch Controls Surface Multi-Touch Controls & API Multi-Touch API WPF 3.5 SP1 WPF 4.0 Managed Wrapper and Interop WPF 3.5 Managed Wrapper and Interop Multi-Touch API and Controls Surface Hardware Windows Vista Surface Hardware Windows 7 Windows 7 Multi-Touch API

  28. Демо

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

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

  31. Вопросы

More Related