Application ID Shortcut Jump List Windows Application ID can “fall back” to a larger scope if...
-
Upload
felix-burns -
Category
Documents
-
view
217 -
download
0
Transcript of Application ID Shortcut Jump List Windows Application ID can “fall back” to a larger scope if...
Application IDApplication ID
ShortcutShortcut
Jump ListJump List
WindowsWindows
Application ID can “fall back”to a larger scope if needed
Default computatio
n
ProcessProcess
Document Type
Registration
Document Type
Registration
#include <windows.h>#pragma comment (lib, "shell32.lib")
SetCurrentProcessExplicitAppUserModelId(L"Microsoft.Samples.AppId1");
#include <windows.h>#pragma comment (lib, "shell32.lib")
SetCurrentProcessExplicitAppUserModelId(L"Microsoft.Samples.AppId1");
TaskbarManager.SetCurrentProcessAppId("Microsoft.Samples.AppId1");
TaskbarManager.SetCurrentProcessAppId("Microsoft.Samples.AppId1");
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)
Destinations(“nouns”)
Tasks(“verbs”)
Known categories
Custom categories
User tasks
Taskbar tasks
Pinned category
SHAddToRecentDocs(SHARDW_PATH, "file.ext");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");
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);
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);
Tasks Thumbnail Buttons
Entry point Menu or toolbar
Application-wide Window-specific
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)
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();
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)
WinForms: TaskbarManager.SetProgressState(TaskbarProgressBarState state, IntPtr windowHandle)
WPF: TaskbarManager.SetProgressState(TaskbarProgressBarState state, System.Windows.Window window)
WinForms: TaskbarManager.SetProgressState(TaskbarProgressBarState state, IntPtr windowHandle)
WPF: TaskbarManager.SetProgressState(TaskbarProgressBarState state, System.Windows.Window window)
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)
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));
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;
Microsoft Confidential
© 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.