Presentation is loading. Please wait.

Presentation is loading. Please wait.

Developing with the Windows API Code Pack for.NET Framework.

Similar presentations


Presentation on theme: "Developing with the Windows API Code Pack for.NET Framework."— Presentation transcript:

1 Developing with the Windows API Code Pack for.NET Framework

2 Microsoft Confidential

3

4

5

6 Demo

7

8

9 > Managed class library to access to Windows (7) features > Windows Shell namespace (supporting for Shell property system) > Taskbar Jumplists, Icon Overlay, Progress bar, Thumbnail, etc… > Windows Task Dialogs, Explorer Browser and other controls > Direct3D 11.0 and DXGI 1.0/1.1 APIs > Sensor Platform APIs > Extended Linguistic Services APIs > Windows Restart Manager > Power APIs > Other…. > http://code.msdn.com/windowsAPICodePack http://code.msdn.com/windowsAPICodePack

10 Version 1.0.1 announcing

11

12 Main Features > Overlay icons & progress bars > Jump lists (destinations, tasks) > Thumbnail toolbars > Custom thumbnails > Tabbed thumbnails Design Tip > Build a great Taskbar Icon > Forget about Quick Launch and the system tray

13 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(); JumpList jl =...; jl.AddUserTasks( params IJumpListTask[] tasks); JumpList jl =...; jl.AddUserTasks( params IJumpListTask[] tasks);

14 UINT wm_tbc = RegisterWindowMessage( "TaskbarButtonCreated"); MSG m; GetMessage(..., &m); if (m.message == wm_tbc) { ITaskbarList3* ptl =...; THUMBBUTTON btn = {...}; ptl->ThumbBarAddButtons(m.hWnd, 1, &btn); } UINT wm_tbc = RegisterWindowMessage( "TaskbarButtonCreated"); MSG m; GetMessage(..., &m); if (m.message == wm_tbc) { ITaskbarList3* ptl =...; THUMBBUTTON btn = {...}; ptl->ThumbBarAddButtons(m.hWnd, 1, &btn); } WinForms: AddButtons(IntPtr windowHandle, params ThumbnailToolbarButton[] buttons) WPF: AddButtons(UIElement control, params ThumbnailToolbarButton[] buttons) WinForms: AddButtons(IntPtr windowHandle, params ThumbnailToolbarButton[] buttons) WPF: AddButtons(UIElement control, params ThumbnailToolbarButton[] buttons)

15 DwmSetWindowAttribute(...,DWMWA_HAS_ICONIC_BITMAP,...); DwmSetWindowAttribute(...,DWMWA_FORCE_ICONIC_REPRESENTATION,...); /* in the WndProc */ case WM_DWMSENDICONICTHUMBNAIL: HBITMAP hbm =...; DwmSetIconicThumbnail(hwnd, hbm,...); DwmSetWindowAttribute(...,DWMWA_HAS_ICONIC_BITMAP,...); DwmSetWindowAttribute(...,DWMWA_FORCE_ICONIC_REPRESENTATION,...); /* in the WndProc */ case WM_DWMSENDICONICTHUMBNAIL: HBITMAP hbm =...; DwmSetIconicThumbnail(hwnd, hbm,...); TabbedThumbnailManager ttm =...; ttm. AddThumbnailPreview(TabbedThumbnail preview) TabbedThumbnailManager ttm =...; ttm. AddThumbnailPreview(TabbedThumbnail preview)

16 WinForms AddButtons(IntPtr windowHandle, params ThumbnailToolbarButton[] buttons) WPF: AddButtons(UIElement control, params ThumbnailToolbarButton[] buttons) WinForms AddButtons(IntPtr windowHandle, params ThumbnailToolbarButton[] buttons) WPF: AddButtons(UIElement control, params ThumbnailToolbarButton[] buttons)

17 WinForms TaskbarManager.SetOverlayIcon( IntPtr windowHandle, System.Drawing.Icon icon, string accessibilityText) WPF TaskbarManager.SetOverlayIcon( System.Windows.Window window, System.Drawing.Icon icon, string accessibilityText) WinForms TaskbarManager.SetOverlayIcon( IntPtr windowHandle, System.Drawing.Icon icon, string accessibilityText) WPF TaskbarManager.SetOverlayIcon( System.Windows.Window window, System.Drawing.Icon icon, string accessibilityText)

18 Demos

19

20 IShellLibrary *pIShelLibrary; HRESULT hr = SHCreateLibrary( IID_PPV_ARGS(&pIShelLibrary)); if (SUCCEEDED(hr)) { IShellItem *pIShellItem; SHAddFolderPathToLibrary(pIShelLibrary, L"C:\\Users\\Public\\Documents"); hr = pIShelLibrary- >SaveInKnownFolder(FOLDERID_Libraries, L"My New Library", LSF_MAKEUNIQUENAME, &pIShellItem); pIShellItem->Release(); pIShelLibrary->Release(); } IShellLibrary *pIShelLibrary; HRESULT hr = SHCreateLibrary( IID_PPV_ARGS(&pIShelLibrary)); if (SUCCEEDED(hr)) { IShellItem *pIShellItem; SHAddFolderPathToLibrary(pIShelLibrary, L"C:\\Users\\Public\\Documents"); hr = pIShelLibrary- >SaveInKnownFolder(FOLDERID_Libraries, L"My New Library", LSF_MAKEUNIQUENAME, &pIShellItem); pIShellItem->Release(); pIShelLibrary->Release(); } ShellLibrary library = new ShellLibrary(name, true) library.Add(folderPath); ShellLibrary library = new ShellLibrary(name, true) library.Add(folderPath);

21 Demo

22

23

24

25

26 > Managed class library to access to Windows (7) features > Windows Shell namespace (supporting for Shell property system) > Taskbar Jumplists, Icon Overlay, Progress bar, Thumbnail, etc… > Windows Task Dialogs, Explorer Browser and other controls > Direct3D 11.0 and DXGI 1.0/1.1 APIs > Sensor Platform APIs > Extended Linguistic Services APIs > Windows Restart Manager > Power APIs > Other…. > http://code.msdn.com/windowsAPICodePack http://code.msdn.com/windowsAPICodePack

27

28 Q2 / Q3 2010 Ver 2.0 Expanded Shell API coverage Ver 1.5 Fundamentals Mar 2010 Ver – 1.0.1 Bug-fixes Nov 2009 Ver - 1.0 Initial release Aug 2009 Ver - 0.9 Preview June 2009

29

30

31

32

33 Built by Developers for Developers….

34 © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

35

36

37

38


Download ppt "Developing with the Windows API Code Pack for.NET Framework."

Similar presentations


Ads by Google