Beispiel #1
0
void CShellIconHelper<T>::SetShellVisible (bool bVisible)
{
    if (bVisible == true) // User wants to show the icon in the shell
    {
        if (m_bVisible == false) // Doesn't already exist?
        {
            // Create the shell, and timer (if applicable)
            CreateShell ();
        } // Otherwise, well you already have icon in the shell. :-)

        SetShellTimer (m_bTimerActive, m_wTimerDuration);

    }
    else // User wants rid of the icon
    { 
        if (m_bVisible == true)  // Is it there already?
        {
            // Destroy any running timer
            if (m_bTimerActive == true)
            {
                ::KillTimer (m_hWnd, m_TimerId);
            }
            DestroyShell (); // Get rid
        }
    }

    m_bVisible = bVisible;
}
Beispiel #2
0
//================================================
// Animate
//================================================
STDMETHODIMP CJMBrkr::Animate(VARIANT_BOOL bAnimate, UINT nDuration)
{
	m_bAnimate = (BOOL)bAnimate;

    // Update the timer in the shell
    SetShellTimer(m_bAnimate, nDuration);

	return S_OK;
}