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); WinForms: TaskbarManager. SetApplicationIdForSpecificWindow(IntPtr windowHandle, string appId) WPF: TaskbarManager. SetApplicationIdForSpecificWindow (System.Windows.Window window, string appId) WinForms: TaskbarManager. SetApplicationIdForSpecificWindow(IntPtr windowHandle, string appId) WPF: TaskbarManager. SetApplicationIdForSpecificWindow (System.Windows.Window window, string appId)"> 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); WinForms: TaskbarManager. SetApplicationIdForSpecificWindow(IntPtr windowHandle, string appId) WPF: TaskbarManager. SetApplicationIdForSpecificWindow (System.Windows.Window window, string appId) WinForms: TaskbarManager. SetApplicationIdForSpecificWindow(IntPtr windowHandle, string appId) WPF: TaskbarManager. SetApplicationIdForSpecificWindow (System.Windows.Window window, string appId)">

Presentation is loading. Please wait.

Presentation is loading. Please wait.

Application ID Shortcut Jump List Windows Application ID can “fall back” to a larger scope if needed Default computation.

Similar presentations


Presentation on theme: "Application ID Shortcut Jump List Windows Application ID can “fall back” to a larger scope if needed Default computation."— Presentation transcript:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18 Application ID Shortcut Jump List Windows Application ID can “fall back” to a larger scope if needed Default computation Process Document Type Registration

19 #include #pragma comment (lib, "shell32.lib") SetCurrentProcessExplicitAppUserModelId( L"Microsoft.Samples.AppId1"); #include #pragma comment (lib, "shell32.lib") SetCurrentProcessExplicitAppUserModelId( L"Microsoft.Samples.AppId1"); TaskbarManager.SetCurrentProcessAppId( "Microsoft.Samples.AppId1"); TaskbarManager.SetCurrentProcessAppId( "Microsoft.Samples.AppId1");

20 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); WinForms: TaskbarManager. SetApplicationIdForSpecificWindow(IntPtr windowHandle, string appId) WPF: TaskbarManager. SetApplicationIdForSpecificWindow (System.Windows.Window window, string appId) WinForms: TaskbarManager. SetApplicationIdForSpecificWindow(IntPtr windowHandle, string appId) WPF: TaskbarManager. SetApplicationIdForSpecificWindow (System.Windows.Window window, string appId)

21

22

23

24

25

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

27

28 SHAddToRecentDocs(SHARDW_PATH, "file.ext"); RH.RegisterFileAssociations(...); OpenFileDialog ofd =...; ofd.ShowDialog(); JumpList jl =...; jl.AddToRecent("file.ext"); RH.RegisterFileAssociations(...); OpenFileDialog ofd =...; ofd.ShowDialog(); JumpList jl =...; jl.AddToRecent("file.ext");

29

30

31 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);

32

33 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(); JumpList jl =...; jlm.AddCustomDestination ( params JumpListCustomCategory[] customCategories); JumpList jl =...; jlm.AddCustomDestination ( params JumpListCustomCategory[] customCategories);

34

35

36 TasksThumbnail Buttons Entry pointMenu or toolbar Application-wideWindow-specific

37 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)

38

39

40

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

42 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)

43 WinForms: TaskbarManager.SetProgressState(TaskbarProgr essBarState state, IntPtr windowHandle) WPF: TaskbarManager.SetProgressState(TaskbarProgr essBarState state, System.Windows.Window window) WinForms: TaskbarManager.SetProgressState(TaskbarProgr essBarState state, IntPtr windowHandle) WPF: TaskbarManager.SetProgressState(TaskbarProgr essBarState state, System.Windows.Window window)

44

45

46

47

48

49

50 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)

51

52

53

54 BOOL truth = TRUE; DwmSetWindowAttribute( hwnd, DWMWA_HAS_ICONIC_BITMAP, &truth, sizeof(truth)); DwmSetWindowAttribute( hwnd, DWMWA_FORCE_ICONIC_REPRESENTATION, &truth, sizeof(truth)); BOOL truth = TRUE; DwmSetWindowAttribute( hwnd, DWMWA_HAS_ICONIC_BITMAP, &truth, sizeof(truth)); DwmSetWindowAttribute( hwnd, DWMWA_FORCE_ICONIC_REPRESENTATION, &truth, sizeof(truth));

55 case WM_DWMSENDICONICTHUMBNAIL: width = HIWORD(lParam); height = LOWORD(lParam); hbm = GetBitmap(..., width, height); DwmSetIconicThumbnail(hwnd, hbm, 0); break; case WM_DWMSENDICONICLIVEPREVIEWBITMAP: hbm = GetBitmap(...); DwmSetIconicLivePreviewBitmap(hwnd,hbm,0); break; case WM_DWMSENDICONICTHUMBNAIL: width = HIWORD(lParam); height = LOWORD(lParam); hbm = GetBitmap(..., width, height); DwmSetIconicThumbnail(hwnd, hbm, 0); break; case WM_DWMSENDICONICLIVEPREVIEWBITMAP: hbm = GetBitmap(...); DwmSetIconicLivePreviewBitmap(hwnd,hbm,0); break;

56

57

58

59

60

61

62

63 Microsoft Confidential

64 © 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.


Download ppt "Application ID Shortcut Jump List Windows Application ID can “fall back” to a larger scope if needed Default computation."

Similar presentations


Ads by Google