void CLibraryTipCtrl::OnPaint(CDC* pDC) { CSingleLock pLock( &m_pSection, TRUE ); CPoint pt( 0, 0 ); DrawText( pDC, &pt, m_sName ); pt.y += TIP_TEXTHEIGHT; pDC->SelectObject( &CoolInterface.m_fntNormal ); if ( m_sSHA1.GetLength() ) { DrawText( pDC, &pt, m_sSHA1 ); pt.y += TIP_TEXTHEIGHT; } if ( m_sTTH.GetLength() ) { DrawText( pDC, &pt, m_sTTH ); pt.y += TIP_TEXTHEIGHT; } if ( m_sED2K.GetLength() ) { DrawText( pDC, &pt, m_sED2K ); pt.y += TIP_TEXTHEIGHT; } DrawRule( pDC, &pt ); CRect rcThumb( pt.x, pt.y, pt.x + 96, pt.y + 96 ); CRect rcWork( &rcThumb ); DrawThumb( pDC, rcWork ); pDC->ExcludeClipRect( &rcThumb ); int nCount = 0; for ( POSITION pos = m_pMetadata.GetIterator() ; pos ; ) { CMetaItem* pItem = m_pMetadata.GetNext( pos ); DrawText( pDC, &pt, theApp.m_bRTL ? ':' + pItem->m_sKey : pItem->m_sKey + ':', 100 ); DrawText( pDC, &pt, pItem->m_sValue, 100 + m_nKeyWidth ); pt.y += TIP_TEXTHEIGHT; if ( ++nCount == 5 ) { pt.x += 98; pt.y -= 2; DrawRule( pDC, &pt, TRUE ); pt.x -= 98; pt.y -= 2; } } }
void CAlbumTipCtrl::OnPaint(CDC* pDC) { CPoint pt( 0, 0 ); DrawText( pDC, &pt, m_sName ); pt.y += TIP_TEXTHEIGHT; pDC->SelectObject( &CoolInterface.m_fntNormal ); DrawText( pDC, &pt, m_sType ); pt.y += TIP_TEXTHEIGHT; DrawRule( pDC, &pt ); CRect rcThumb( pt.x, pt.y, pt.x + 96, pt.y + 96 ); CRect rcWork( &rcThumb ); DrawThumb( pDC, rcWork ); pDC->ExcludeClipRect( &rcThumb ); int nCount = 0; for ( POSITION pos = m_pMetadata.GetIterator(); pos; ) { CMetaItem* pItem = m_pMetadata.GetNext( pos ); DrawText( pDC, &pt, pItem->m_sKey + ':', 100 ); DrawText( pDC, &pt, pItem->m_sValue, 100 + m_nKeyWidth ); pt.y += TIP_TEXTHEIGHT; if ( ++nCount == 5 ) { pt.x += 98; pt.y -= 2; DrawRule( pDC, &pt, TRUE ); pt.x -= 98; pt.y -= 2; } } }
void CMatchTipCtrl::OnPaint(CDC* pDC) { CPoint pt( 0, 0 ); CSize sz( m_sz.cx, TIP_TEXTHEIGHT ); DrawText( pDC, &pt, m_sName ); pt.y += TIP_TEXTHEIGHT; pDC->SelectObject( &CoolInterface.m_fntNormal ); if ( m_sUser.GetLength() ) { DrawText( pDC, &pt, m_sUser ); pt.y += TIP_TEXTHEIGHT; } if ( m_sCountry.GetLength() ) { int nFlagIndex = Flags.GetFlagIndex( m_sCountryCode ); if ( nFlagIndex >= 0 ) { Flags.Draw( nFlagIndex, *pDC, pt.x, pt.y, CoolInterface.m_crTipBack, CoolInterface.m_crTipBack ); pDC->ExcludeClipRect( pt.x, pt.y, pt.x + 16, pt.y + 16 ); } pt.x += 16 + 4; DrawText( pDC, &pt, m_sCountry ); pt.x -= 16 + 4; pt.y += max( 16, TIP_TEXTHEIGHT ); } if ( m_sStatus.GetLength() ) { DrawRule( pDC, &pt ); pDC->SetTextColor( m_crStatus ); pDC->SelectObject( &CoolInterface.m_fntBold ); DrawText( pDC, &pt, m_sStatus ); pDC->SelectObject( &CoolInterface.m_fntNormal ); pDC->SetTextColor( CoolInterface.m_crTipText ); pt.y += TIP_TEXTHEIGHT; } DrawRule( pDC, &pt ); ShellIcons.Draw( pDC, m_nIcon, 32, pt.x, pt.y, CoolInterface.m_crTipBack ); pDC->ExcludeClipRect( pt.x, pt.y, pt.x + 32, pt.y + 32 ); if ( m_nRating > 1 ) { CPoint ptStar( m_sz.cx - 3, pt.y - 2 ); for ( int nRating = m_nRating - 1 ; nRating ; nRating-- ) { ptStar.x -= 16; CoolInterface.Draw( pDC, IDI_STAR, 16, ptStar.x, ptStar.y, CoolInterface.m_crTipBack ); pDC->ExcludeClipRect( ptStar.x, ptStar.y, ptStar.x + 16, ptStar.y + 16 ); } } pt.x += 40; DrawText( pDC, &pt, m_sSize ); pt.y += TIP_TEXTHEIGHT; DrawText( pDC, &pt, m_sType ); pt.y -= TIP_TEXTHEIGHT; pt.x -= 40; pt.y += max( 32, TIP_TEXTHEIGHT * 2 ); //Hashes if ( m_sSHA1.GetLength() || m_sTiger.GetLength() || m_sED2K.GetLength() || m_sBTH.GetLength() || m_sMD5.GetLength() ) { DrawRule( pDC, &pt ); if ( m_sSHA1.GetLength() ) { DrawText( pDC, &pt, m_sSHA1 ); pt.y += TIP_TEXTHEIGHT; } if ( m_sTiger.GetLength() ) { DrawText( pDC, &pt, m_sTiger ); pt.y += TIP_TEXTHEIGHT; } if ( m_sED2K.GetLength() ) { DrawText( pDC, &pt, m_sED2K ); pt.y += TIP_TEXTHEIGHT; } if ( m_sBTH.GetLength() ) { DrawText( pDC, &pt, m_sBTH ); pt.y += TIP_TEXTHEIGHT; } if ( m_sMD5.GetLength() ) { DrawText( pDC, &pt, m_sMD5 ); pt.y += TIP_TEXTHEIGHT; } } //Busy, firewalled, unstabled warnings. Queue info if ( m_sBusy.GetLength() || m_sPush.GetLength() || m_sUnstable.GetLength() || m_sQueue.GetLength() ) { DrawRule( pDC, &pt ); pDC->SetTextColor( CoolInterface.m_crTipWarnings ); pDC->SelectObject( &CoolInterface.m_fntBold ); //Source busy warning if (m_sBusy.GetLength()) { CoolInterface.Draw( pDC, IDI_BUSY, 16, pt.x, pt.y, CoolInterface.m_crTipBack ); pDC->ExcludeClipRect( pt.x, pt.y, pt.x + 16, pt.y + 16 ); pt.x += 20; DrawText( pDC, &pt, m_sBusy); pt.x -= 20; pt.y += max( 16, TIP_TEXTHEIGHT ); } pDC->SetTextColor( CoolInterface.m_crTipText ); pDC->SelectObject( &CoolInterface.m_fntNormal ); //Queue info if ( m_sQueue.GetLength() ) { if ( m_sBusy.GetLength() || m_sPush.GetLength() || m_sUnstable.GetLength() ) // Align queue info with above (if present) { pt.x += 20; DrawText( pDC, &pt, m_sQueue ); pt.x -= 20; } else DrawText( pDC, &pt, m_sQueue ); pt.y += TIP_TEXTHEIGHT; } pDC->SetTextColor( CoolInterface.m_crTipWarnings ); pDC->SelectObject( &CoolInterface.m_fntBold ); //Source firewalled warning if (m_sPush.GetLength()) { CoolInterface.Draw( pDC, IDI_FIREWALLED, 16, pt.x, pt.y, CoolInterface.m_crTipBack ); pDC->ExcludeClipRect( pt.x, pt.y, pt.x + 16, pt.y + 16 ); pt.x += 20; DrawText( pDC, &pt, m_sPush); pt.x -= 20; pt.y += max( 16, TIP_TEXTHEIGHT ); } //Source unstable warning if (m_sUnstable.GetLength()) { CoolInterface.Draw( pDC, IDI_UNSTABLE, 16, pt.x, pt.y, CoolInterface.m_crTipBack ); pDC->ExcludeClipRect( pt.x, pt.y, pt.x + 16, pt.y + 16 ); pt.x += 20; DrawText( pDC, &pt, m_sUnstable); pt.x -= 20; pt.y += max( 16, TIP_TEXTHEIGHT ); } pDC->SetTextColor( CoolInterface.m_crTipText ); pDC->SelectObject( &CoolInterface.m_fntNormal ); } //Partial warning if ( m_sPartial.GetLength() ) { DrawRule( pDC, &pt ); DrawText( pDC, &pt, m_sPartial ); pt.y += TIP_TEXTHEIGHT; } //Metadata if ( m_pMetadata.GetCount( TRUE ) ) { DrawRule( pDC, &pt ); for ( POSITION pos = m_pMetadata.GetIterator() ; pos ; ) { const CMetaItem* pItem = m_pMetadata.GetNext( pos ); if ( pItem->m_pMember && pItem->m_pMember->m_bHidden ) continue; DrawText( pDC, &pt, Settings.General.LanguageRTL ? _T(':') + pItem->m_sKey : pItem->m_sKey + _T(':') ); pt.x += m_nKeyWidth; DrawText( pDC, &pt, pItem->m_sValue ); pt.x -= m_nKeyWidth; pt.y += TIP_TEXTHEIGHT; } } }
void CUploadTipCtrl::OnPaint(CDC* pDC, CUploadTransfer* pUpload) { CPoint pt( 0, 0 ); CSize sz( m_sz.cx, TIP_TEXTHEIGHT ); DrawText( pDC, &pt, m_pUploadFile->m_sName ); pt.y += TIP_TEXTHEIGHT; DrawText( pDC, &pt, m_sAddress ); pDC->SelectObject( &CoolInterface.m_fntNormal ); pt.y += TIP_TEXTHEIGHT; int nFlagIndex = Flags.GetFlagIndex( pUpload->m_sCountry ); if ( nFlagIndex >= 0 ) { Flags.Draw( nFlagIndex, pDC->GetSafeHdc(), pt.x, pt.y, CoolInterface.m_crTipBack ); pDC->ExcludeClipRect( pt.x, pt.y, pt.x + 16, pt.y + 16 ); } pt.x += 16 + 4; DrawText( pDC, &pt, pUpload->m_sCountryName ); pt.x -= 16 + 4; pt.y += 16; DrawRule( pDC, &pt ); CString strStatus, strSpeed, strText; CString strOf; LoadString( strOf, IDS_GENERAL_OF ); strSpeed.Format( _T("%s %s %s (%s)"), (LPCTSTR)Settings.SmartSpeed( pUpload->GetMeasuredSpeed() ), (LPCTSTR)strOf, (LPCTSTR)Settings.SmartSpeed( pUpload->m_nBandwidth ), (LPCTSTR)Settings.SmartSpeed( pUpload->GetMaxSpeed() ) ); int nQueue = UploadQueues.GetPosition( pUpload, FALSE ); if ( m_pUploadFile != pUpload->m_pBaseFile || pUpload->m_nState == upsNull ) { LoadString( strStatus, IDS_TIP_INACTIVE ); } else if ( nQueue == 0 ) { if ( pUpload->m_nState == upsQueued ) { LoadString( strText, IDS_TIP_NEXT ); strStatus.Format( _T("%s: %s"), (LPCTSTR)pUpload->m_pQueue->m_sName, (LPCTSTR)strText ); } else { LoadString( strText, IDS_TIP_ACTIVE ); strStatus.Format( _T("%s: %s"), (LPCTSTR)pUpload->m_pQueue->m_sName, (LPCTSTR)strText ); } } else if ( nQueue > 0 ) { strStatus.Format( _T("%s: %i %s %u"), (LPCTSTR)pUpload->m_pQueue->m_sName, nQueue, (LPCTSTR)strOf, pUpload->m_pQueue->GetQueuedCount() ); } else { LoadString( strStatus, IDS_TIP_ACTIVE ); } LoadString( strText, IDS_TIP_STATUS ); DrawText( pDC, &pt, strText ); DrawText( pDC, &pt, strStatus, 80 ); pt.y += TIP_TEXTHEIGHT; LoadString( strText, IDS_TIP_SPEED ); DrawText( pDC, &pt, strText ); DrawText( pDC, &pt, strSpeed, 80 ); pt.y += TIP_TEXTHEIGHT; LoadString( strText, IDS_TIP_USERAGENT ); DrawText( pDC, &pt, strText ); DrawText( pDC, &pt, pUpload->m_sUserAgent, 80 ); pt.y += TIP_TEXTHEIGHT; pt.y += TIP_GAP; DrawProgressBar( pDC, &pt, m_pUploadFile ); pt.y += TIP_GAP; CRect rc( pt.x, pt.y, m_sz.cx, pt.y + 40 ); pDC->Draw3dRect( &rc, CoolInterface.m_crTipBorder, CoolInterface.m_crTipBorder ); rc.DeflateRect( 1, 1 ); if ( m_pGraph) m_pGraph->BufferedPaint( pDC, &rc ); rc.InflateRect( 1, 1 ); pDC->ExcludeClipRect( &rc ); pt.y += 40; pt.y += TIP_GAP; if ( Settings.General.GUIMode != GUI_BASIC ) { if ( m_nHeaders != pUpload->m_pHeaderName.GetSize() ) { ShowImpl( true ); return; } for ( int nHeader = 0 ; nHeader < m_nHeaders ; nHeader++ ) { CString strName = pUpload->m_pHeaderName.GetAt( nHeader ) + _T(':'); CString strValue = pUpload->m_pHeaderValue.GetAt( nHeader ); DrawText( pDC, &pt, strName ); pt.x += m_nHeaderWidth; sz.cx -= m_nHeaderWidth; DrawText( pDC, &pt, strValue, &sz ); pt.x -= m_nHeaderWidth; sz.cx += m_nHeaderWidth; pt.y += TIP_TEXTHEIGHT; } } }
void CLibraryTipCtrl::OnPaint(CDC* pDC) { CSingleLock pLock( &m_pSection, TRUE ); CPoint pt( 0, 0 ); CSize sz( m_sz.cx, TIP_TEXTHEIGHT ); DrawText( pDC, &pt, m_sName, &sz ); pt.y += TIP_TEXTHEIGHT; pDC->SelectObject( &CoolInterface.m_fntNormal ); if ( ! m_sSHA1.IsEmpty() ) { DrawText( pDC, &pt, m_sSHA1, &sz ); pt.y += TIP_TEXTHEIGHT; } if ( ! m_sTTH.IsEmpty() ) { DrawText( pDC, &pt, m_sTTH, &sz ); pt.y += TIP_TEXTHEIGHT; } if ( ! m_sED2K.IsEmpty() ) { DrawText( pDC, &pt, m_sED2K, &sz ); pt.y += TIP_TEXTHEIGHT; } if ( ! m_sBTH.IsEmpty() ) { DrawText( pDC, &pt, m_sBTH, &sz ); pt.y += TIP_TEXTHEIGHT; } if ( ! m_sMD5.IsEmpty() ) { DrawText( pDC, &pt, m_sMD5, &sz ); pt.y += TIP_TEXTHEIGHT; } DrawRule( pDC, &pt ); CRect rcThumb( pt.x, pt.y, pt.x + Settings.Library.ThumbSize + 2, pt.y + Settings.Library.ThumbSize + 2 ); CoolInterface.DrawThumbnail( pDC, rcThumb, IsThreadAlive(), FALSE, m_bmThumb, m_nIcon, -1 ); pDC->ExcludeClipRect( &rcThumb ); int nCount = 0; pt.x += Settings.Library.ThumbSize; sz.cx -= pt.x + 8 + m_nKeyWidth; for ( POSITION pos = m_pMetadata.GetIterator() ; pos ; ) { CMetaItem* pItem = m_pMetadata.GetNext( pos ); if ( pItem->m_pMember && pItem->m_pMember->m_bHidden ) continue; pt.x += 8; DrawText( pDC, &pt, Settings.General.LanguageRTL ? ':' + pItem->m_sKey : pItem->m_sKey + ':', &sz ); pt.x += m_nKeyWidth; DrawText( pDC, &pt, pItem->m_sValue, &sz ); pt.x -= 8 + m_nKeyWidth; pt.y += TIP_TEXTHEIGHT; if ( ++nCount == 5 ) { pt.x += 4; pt.y -= 2; DrawRule( pDC, &pt, TRUE ); pt.x -= 4; pt.y -= 2; } } }
// run over the glyphs collecting information before calling client // with APPDrawString void scDrawLine::Draw() { caseState prevCase = noCase; caseState curCase = noCase; CharRecord chRec; SetCharData( ); if ( !fOffset && scCachedStyle::GetParaStyle().GetNumbered() ) DrawBullet(); scCachedStyle& cachedStyle = scCachedStyle::GetCurrentCache(); for ( ; fToDraw > 0; ) { // if there is a spec change dump any characters in the buffer if ( fOffset >= fSpecRec->offset() ) { cachedStyle = UpdateSpec(); prevCase = noCase; } #ifdef jis4051 if ( fChRec->flags.GetRenMoji() > 0 ) ProcessRenMoji(); else #endif { UCS2 ch = CMctToAPP( fChRec->character ); switch ( fChRec->character ) { case scField: DrawField(); break; case scRulePH: DrawRule(); break; case scFillSpace: case scTabSpace: DrawTabSpace(); break; default: if (ch) { chRec.Set( CMctToAPP( ch ), fChRec->flags, fChRec->escapement ); SetCharArray( chRec, LETTERSPACE( fChRec ) ); } break; case scFixRelSpace: chRec.Set( CMctToAPP( ch ), SCRLUCompGS( cachedStyle.GetGlyphWidth() , (RLU)fChRec->escapement ) ); SetCharArray( chRec, false ); break; case scFixAbsSpace: chRec.Set( CMctToAPP( ch ), fChRec->escapement ); SetCharArray( chRec, false ); break; } IncrementBackingStore(); } prevCase = curCase; } if ( fEndOffset == fPara.GetContentSize() ) { UCS2 ch = fCount ? (fChRec-1)->character : (UCS2)0; switch ( ch ) { case scHardReturn: case scVertTab: break; default: if ( fPara.Next() ) fStreamPosition = eEndOfPara; else fStreamPosition = eEndOfStream; break; } } if ( fCount || fStreamPosition != eNoEnd ) { if ( fCount ) { scCharFlags flags = (fChRec-1)->flags; if ( flags.IsHyphPresent() ) ProcessHyphen( flags ); } if ( fStreamPosition == eEndOfPara ) { if ( CMctToAPP( scParaEnd ) ) { chRec.Set( CMctToAPP( scParaEnd ), scCachedStyle::GetCurrentCache().GetPtSize() ); SetCharArray( chRec, false ); } } else if ( fStreamPosition == eEndOfStream ) { if ( CMctToAPP( scEndStream ) ) { chRec.Set( CMctToAPP( scEndStream ), scCachedStyle::GetCurrentCache().GetPtSize() ); SetCharArray( chRec, false ); } } OutputLine(); } }
void CNeighbourTipCtrl::OnPaint(CDC* pDC) { CSingleLock pLock( &Network.m_pSection ); if ( ! pLock.Lock( 100 ) ) return; const CNeighbour* pNeighbour = Neighbours.Get( m_nNeighbour ); if ( pNeighbour == NULL ) return; CPoint pt( 0, 0 ); CString str; if ( pNeighbour->m_pProfile != NULL && pNeighbour->m_pProfile->IsValid() ) { str = pNeighbour->m_pProfile->GetNick(); if ( ! str.IsEmpty() ) { pDC->SelectObject( &CoolInterface.m_fntBold ); DrawText( pDC, &pt, str ); pt.y += TIP_TEXTHEIGHT; } pDC->SelectObject( &CoolInterface.m_fntNormal ); str = pNeighbour->m_pProfile->GetLocation(); if ( ! str.IsEmpty() ) { DrawText( pDC, &pt, str ); pt.y += TIP_TEXTHEIGHT; } DrawRule( pDC, &pt ); } else if ( ! pNeighbour->m_sServerName.IsEmpty() ) // pNeighbour->m_nProtocol == PROTOCOL_ED2K || PROTOCOL_DC { pDC->SelectObject( &CoolInterface.m_fntBold ); DrawText( pDC, &pt, pNeighbour->m_sServerName ); pt.y += TIP_TEXTHEIGHT; DrawRule( pDC, &pt ); } // Show large protocol icon (unused) //CRect rcProtocol( m_sz.cx - 32 - 4, pt.y + 4, m_sz.cx - 4, pt.y + 32 + 4 ); //ImageList_DrawEx( m_pProtocols, pNeighbour->m_nProtocol, pDC->GetSafeHdc(), // rcProtocol.left, rcProtocol.top, rcProtocol.Width(), rcProtocol.Height(), // Colors.m_crTipBack, CLR_DEFAULT, ILD_NORMAL ); //pDC->ExcludeClipRect( &rcProtocol ); pDC->SelectObject( &CoolInterface.m_fntBold ); DrawText( pDC, &pt, pNeighbour->m_sAddress ); pDC->SelectObject( &CoolInterface.m_fntNormal ); pt.y += TIP_TEXTHEIGHT; if ( ! pNeighbour->m_sCountryName.IsEmpty() ) { int nFlagIndex = Flags.GetFlagIndex( pNeighbour->m_sCountry ); if ( nFlagIndex >= 0 ) { Flags.Draw( nFlagIndex, pDC->GetSafeHdc(), pt.x, pt.y, Images.m_bmToolTip.m_hObject ? CLR_NONE : Colors.m_crTipBack, CLR_NONE, ILD_NORMAL ); pDC->ExcludeClipRect( pt.x, pt.y, pt.x + 16, pt.y + 16 ); pt.y += 2; pt.x += 25; DrawText( pDC, &pt, pNeighbour->m_sCountryName ); pt.x -= 25; } else { DrawText( pDC, &pt, pNeighbour->m_sCountryName ); } pt.y += TIP_TEXTHEIGHT + 2; } if ( ! pNeighbour->m_sUserAgent.IsEmpty() ) str = pNeighbour->m_sUserAgent; else str = L"(" + (CString)protocolNames[ pNeighbour->m_nProtocol ] + L")"; DrawText( pDC, &pt, str ); pt.y += TIP_TEXTHEIGHT; if ( pNeighbour->m_nState < nrsConnected ) { LoadString( str, IDS_NEIGHBOUR_HANDSHAKE ); } else { switch ( pNeighbour->m_nProtocol ) { case PROTOCOL_G1: switch ( pNeighbour->m_nNodeType ) { case ntNode: LoadString( str, IDS_NEIGHBOUR_G1PP ); break; case ntHub: LoadString( str, IDS_NEIGHBOUR_G1LU ); break; case ntLeaf: LoadString( str, IDS_NEIGHBOUR_G1UL ); break; } break; case PROTOCOL_G2: switch ( pNeighbour->m_nNodeType ) { case ntNode: LoadString( str, IDS_NEIGHBOUR_G2HH ); break; case ntHub: LoadString( str, IDS_NEIGHBOUR_G2LH ); break; case ntLeaf: LoadString( str, IDS_NEIGHBOUR_G2HL ); break; } break; case PROTOCOL_ED2K: if ( CEDNeighbour* pED = (CEDNeighbour*)pNeighbour ) { if ( CEDPacket::IsLowID( pED->m_nClientID ) ) str.Format( LoadString( IDS_NEIGHBOUR_ED2K_LOW ), pED->m_nClientID ); else LoadString( str, IDS_NEIGHBOUR_ED2K_HIGH ); } break; case PROTOCOL_DC: LoadString( str, IDS_NEIGHBOUR_DCHUB ); break; default: LoadString( str, IDS_NEIGHBOUR_HANDSHAKE ); break; } } DrawText( pDC, &pt, str ); pt.y += TIP_TEXTHEIGHT; DrawRule( pDC, &pt ); pDC->SelectObject( &CoolInterface.m_fntBold ); pDC->SetTextColor( m_pItemIn->m_nColor ); LoadString( str, IDS_NEIGHBOUR_INBOUND ); DrawText( pDC, &pt, str, 128 ); pDC->SetTextColor( m_pItemOut->m_nColor ); LoadString( str, IDS_NEIGHBOUR_OUTBOUND ); DrawText( pDC, &pt, str, 128 + 80 ); pDC->SelectObject( &CoolInterface.m_fntNormal ); pDC->SetTextColor( 0 ); pt.y += TIP_TEXTHEIGHT; LoadString( str, IDS_NEIGHBOUR_CURRENT ); DrawText( pDC, &pt, str ); str = Settings.SmartSpeed( pNeighbour->m_mInput.nMeasure ); DrawText( pDC, &pt, str, 128 ); str = Settings.SmartSpeed( pNeighbour->m_mOutput.nMeasure ); DrawText( pDC, &pt, str, 128 + 80 ); pt.y += TIP_TEXTHEIGHT; LoadString( str, IDS_NEIGHBOUR_TOTAL ); DrawText( pDC, &pt, str ); str = Settings.SmartVolume( pNeighbour->m_mInput.nTotal ); DrawText( pDC, &pt, str, 128 ); str = Settings.SmartVolume( pNeighbour->m_mOutput.nTotal ); DrawText( pDC, &pt, str, 128 + 80 ); pt.y += TIP_TEXTHEIGHT; float nCompIn, nCompOut; pNeighbour->GetCompression( nCompIn, nCompOut ); LoadString( str, IDS_NEIGHBOUR_COMPRESSION ); DrawText( pDC, &pt, str ); LoadString( str, nCompIn > 0 ? IDS_NEIGHBOUR_COMPRESSION_DF : IDS_NEIGHBOUR_COMPRESSION_NONE ); DrawText( pDC, &pt, str, 128 ); LoadString( str, nCompOut > 0 ? IDS_NEIGHBOUR_COMPRESSION_DF : IDS_NEIGHBOUR_COMPRESSION_NONE ); DrawText( pDC, &pt, str, 128 + 80 ); pt.y += TIP_TEXTHEIGHT; if ( nCompIn > 0 || nCompOut > 0 ) { LoadString( str, IDS_NEIGHBOUR_RATIO ); DrawText( pDC, &pt, str ); ( nCompIn > 0 ) ? str.Format( _T("%.2f%%"), nCompIn * 100.0 ) : str.Empty(); DrawText( pDC, &pt, str, 128 ); ( nCompOut > 0 ) ? str.Format( _T("%.2f%%"), nCompOut * 100.0 ) : str.Empty(); DrawText( pDC, &pt, str, 128 + 80 ); pt.y += TIP_TEXTHEIGHT; } pt.y += TIP_TEXTHEIGHT - 2; CRect rc( pt.x, pt.y, m_sz.cx, pt.y + 40 ); pDC->Draw3dRect( &rc, Colors.m_crTipBorder, Colors.m_crTipBorder ); rc.DeflateRect( 1, 1 ); m_pGraph->BufferedPaint( pDC, &rc ); rc.InflateRect( 1, 1 ); pDC->ExcludeClipRect( &rc ); pt.y += 40; }