API for change the visibility of button in the taskbar.
- ShowInTaskbar and HideInTaskbar - Sample of usage. Author: Chaobin Zhang git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77592 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: src/msw/taskbarbutton.cpp
|
||||
// Purpose: Implements wxTaskbarButtonImpl class for manipulating buttons on
|
||||
// Purpose: Implements wxTaskBarButtonImpl class for manipulating buttons on
|
||||
// the Windows taskbar.
|
||||
// Author: Chaobin Zhang <zhchbin@gmail.com>
|
||||
// Created: 2014-06-01
|
||||
@@ -22,7 +22,8 @@
|
||||
|
||||
#include <Shobjidl.h>
|
||||
|
||||
wxTaskBarButtonImpl::wxTaskBarButtonImpl(WXWidget parent) : m_hwnd(parent)
|
||||
wxTaskBarButtonImpl::wxTaskBarButtonImpl(WXWidget parent)
|
||||
: m_hwnd(parent), m_taskbarList(NULL)
|
||||
{
|
||||
HRESULT hr = CoCreateInstance
|
||||
(
|
||||
@@ -60,4 +61,14 @@ void wxTaskBarButtonImpl::SetProgressValue(int value)
|
||||
m_taskbarList->SetProgressValue(m_hwnd, value, 100);
|
||||
}
|
||||
|
||||
void wxTaskBarButtonImpl::ShowInTaskbar()
|
||||
{
|
||||
m_taskbarList->AddTab(m_hwnd);
|
||||
}
|
||||
|
||||
void wxTaskBarButtonImpl::HideInTaskbar()
|
||||
{
|
||||
m_taskbarList->DeleteTab(m_hwnd);
|
||||
}
|
||||
|
||||
#endif // wxUSE_TASKBARBUTTON
|
||||
|
Reference in New Issue
Block a user