void TZNoteBook::DrawItem( LPDRAWITEMSTRUCT pDrawInfo ) { #if 0 //def DEBUG_ALL lots of messages TraceLineS( "TZNoteBook::DrawItem ================>", "" ); #endif if ( pDrawInfo->hwndItem != m_hWnd ) { if ( ReflectLastMsg( pDrawInfo->hwndItem ) ) return; // eat it } CRect rect; rect.left = pDrawInfo->rcItem.left; rect.right = pDrawInfo->rcItem.right; rect.top = pDrawInfo->rcItem.top; rect.bottom = pDrawInfo->rcItem.bottom; HBRUSH hLiteBrush = ::CreateSolidBrush( ::GetSysColor( COLOR_BTNFACE ) ); ::FillRect( pDrawInfo->hDC, &rect, hLiteBrush ); DeleteObject( hLiteBrush ); CTabCtrl::DrawItem( pDrawInfo ); }
// Drawing: for all 4 control types void TZNoteBook::OnDrawItem( int nIDCtl, LPDRAWITEMSTRUCT pDrawInfo ) { #if 0 //def DEBUG_ALL lots of messages TraceLineS( "TZNoteBook::OnDrawItem ================>", "" ); #endif if ( pDrawInfo->CtlType == ODT_MENU ) { CMenu* pMenu = CMenu::FromHandlePermanent( (HMENU) pDrawInfo->hwndItem ); if ( pMenu ) { pMenu->DrawItem( pDrawInfo ); return; // eat it } } else { // Reflect notification to child window control. if ( ReflectLastMsg( pDrawInfo->hwndItem ) ) return; // eat it } // not handled - do default Default( ); }
void CPlayerView::OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) { if ( pScrollBar && pScrollBar->m_hWnd == m_Volume.m_hWnd ) { ReflectLastMsg( pScrollBar->GetSafeHwnd() ); } else { // CPlayerView::OnVScroll( nSBCode, nPos, pScrollBar ); } }