void AscentApMfd::DecPage () { const DWORD npage = 4; cpg = (cpg == 0 ? npage-3 : cpg-1); InvalidateButtons(); InvalidateDisplay(); }
void AscentApMfd::IncPage () { const DWORD npage = 4; cpg = (cpg == npage-1 ? 0 : cpg+1); InvalidateButtons(); InvalidateDisplay(); }
bool AscentApMfd::OnDisengage () { if (ap->Active()) { ap->Disengage(); InvalidateButtons(); } return true; }
bool AscentApMfd::OnLaunch () { if (!ap->Active()) { if (ap->GetVessel()->status == 0) { ap->Launch(); InvalidateButtons(); } } return true; }
BOOL CXTPSkinObjectFrame::HandleMouseMove(CPoint point) { CPoint ptClient(point); ScreenToFrame(&ptClient); CCaptionButton* pButton = HitTestButton(ptClient); if (m_pButtonHot != pButton) { if (m_pButtonHot && !pButton) CancelMouseLeaveTracking(); m_pButtonHot = pButton; InvalidateButtons(); if (m_pButtonHot) { SetTimer(XTP_TID_MOUSELEAVE, 50, &OnTimerInternal); return TRUE; } } if (m_pSBTrack) return TRUE; BOOL bResult = FALSE; for (int i = 0; i < 2; i++) { XTP_SKINSCROLLBARPOSINFO* pSBInfo = &m_spi[i]; int ht = HitTestScrollBar(pSBInfo, ptClient); if (ht != pSBInfo->ht && pSBInfo->fVisible) { if (pSBInfo->ht != HTNOWHERE && ht == HTNOWHERE && !bResult) { CancelMouseLeaveTracking(); } pSBInfo->ht = ht; RedrawScrollBar(pSBInfo); } if (ht != HTNOWHERE) { SetTimer (XTP_TID_MOUSELEAVE, 50, &OnTimerInternal); bResult = TRUE; } } return bResult; }