Пример #1
0
HRESULT CXTPTaskPanelGroup::AccessibleDoDefaultAction(VARIANT varChild)
{
	SAFE_MANAGE_STATE(m_pModuleState);

	if (GetChildIndex(&varChild) != CHILDID_SELF)
		return E_INVALIDARG;

	SetExpanded(!IsExpanded());

	return S_OK;
}
VOID CALLBACK CXTPCalendarController::CXTPDayInfoCache::OnTimerCallback(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
{
    UNREFERENCED_PARAMETER(hwnd);
    UNREFERENCED_PARAMETER(uMsg);
    UNREFERENCED_PARAMETER(dwTime);

    CXTPDayInfoCache* pThis = m_mapTimers[idEvent];
    ASSERT(pThis && pThis->m_pOwner);

    if (pThis && pThis->m_pOwner)
    {
        //***********************
        SAFE_MANAGE_STATE(pThis->m_pOwner->m_pModuleState);
        //***********************

        pThis->OnRefreshDays(pThis->m_pOwner->m_nBoldDaysPerIdleStep);
    }
}
Пример #3
0
LRESULT CALLBACK CXTPMouseManager::MouseProc(int nCode, WPARAM wParam, LPARAM lParam)
{
	CXTPMouseManager* pMouseManager = XTPMouseManager();

	if (nCode != HC_ACTION)
		return CallNextHookEx(pMouseManager->m_hHookMouse, nCode, wParam, lParam);

	PMOUSEHOOKSTRUCT pHook = (PMOUSEHOOKSTRUCT)lParam;
	CPoint point = pHook->pt;

	CTrackArray& arrTracked = pMouseManager->m_arrTracked;

	if (wParam == WM_LBUTTONDOWN || wParam == WM_RBUTTONDOWN)
		pMouseManager->m_bIgnoreLButtonUp = FALSE;

	if ((wParam == WM_LBUTTONUP || wParam == WM_NCLBUTTONUP) && pMouseManager->m_bIgnoreLButtonUp)
	{
		pMouseManager->m_bIgnoreLButtonUp = FALSE;
		return TRUE;
	}

	if (arrTracked.GetSize() != 0 && (wParam == WM_MOUSEMOVE || wParam == WM_NCMOUSEMOVE) && ptMouse == point)
		return TRUE;

	ptMouse = point;

	if (pMouseManager->m_arrTracked.GetSize() == 0)
		return CallNextHookEx(pMouseManager->m_hHookMouse, nCode, wParam, lParam);

	SAFE_MANAGE_STATE(pMouseManager->m_pModuleState);

	if (pMouseManager->PreTranslateMouseEvents(wParam, point))
	{
		return 1;
	}

	return CallNextHookEx(pMouseManager->m_hHookMouse, nCode, wParam, lParam);

}