写在Windows 7英寸,预览和QUOT;窗口区 [英] Writing to the Windows 7 "preview" window area
问题描述
我怎么能写或使用C#绘制控件添加到Windows 7的预览区域?对于什么,我在Windows 7中谈到,打开Windows Media Player播放一首歌曲的一个例子。当播放歌曲时,尽量减少Windows媒体播放器,然后将鼠标悬停在Windows媒体播放器图标,你会看到一个暂停,倒带,只是实际的媒体播放器的预览窗口下方快进键。我如何能复制这种在C#中的行为
How can I write or draw controls to the Windows 7 preview area using C#? For an example of what I am talking about, open Windows Media Player in Windows 7 and play a song. While the song is playing, minimize Windows Media player, then hover your mouse over the Windows Media Player icon and you will see a pause, rewind and fast forward button just below the actual Media Player preview window. How can I duplicate this kind of behavior in C#?
推荐答案
您正在寻找的 Windows 7的工具栏缩略图:
缩略图工具栏提供了一个迷你
远程控制从它的缩略图
机会之窗。对于
例如,要切换到
Windows媒体播放器的下一首歌曲,你不需要
使用笨拙的媒体播放器办公桌带
或切换到媒体播放器
应用。相反,您可以直接使用
缩略图工具栏到B这个任务执行$ B $,无需通过跳跃到另一个
应用打断你的
的工作流程。
Thumbnail toolbars provide a mini "remote-control" opportunity for a window from its thumbnail. For example, to switch to the next song in Windows Media Player you don't need to use the clumsy Media Player desk band or to switch to the Media Player application. Instead, you can use the thumbnail toolbar directly to perform this task, without interrupting your work flow by jumping to another application.
从MSDN文章无耻复制:
Copied shamelessly from that MSDN article:
//In your window procedure:
switch (msg) {
case g_wmTBC://TaskbarButtonCreated
THUMBBUTTON buttons[2];
buttons[0].dwMask = THB_ICON|THB_TOOLTIP|THB_FLAGS;
buttons[0].iId = 0;
buttons[0].hIcon = GetIconForButton(0);
wcscpy(buttons[0].szTip, L"Tooltip 1");
buttons[0].dwFlags = THBF_ENABLED;
buttons[1].dwMask = THB_ICON|THB_TOOLTIP|THB_FLAGS;
buttons[1].iId = 1;
buttons[1].hIcon = GetIconForButton(1);
wcscpy(buttons[0].szTip, L"Tooltip 2");
buttons[1].dwFlags = THBF_ENABLED;
VERIFY(ptl->ThumbBarAddButtons(hWnd, 2,buttons));
break;
case WM_COMMAND:
if (HIWORD(wParam) == THBN_CLICKED)
{
if (LOWORD(wParam) == 0)
MessageBox(L"Button 0 clicked", ...);
if (LOWORD(wParam) == 1)
MessageBox(L"Button 1 clicked", ...);
}
break;
}
这篇关于写在Windows 7英寸,预览和QUOT;窗口区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!