Changeset 1345 for trunk

Show
Ignore:
Timestamp:
01/11/08 15:02:08 (9 months ago)
Author:
calvin
Message:

fix plur-flicker in right click create machine menu

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/buzelib/Utils/plur.cpp

    r1273 r1345  
    114114void PlurManager::drawItem(LPDRAWITEMSTRUCT lpDrawItem, MachineMenuItem* item) { 
    115115 
    116         CBrush bgBrush; 
    117         bgBrush.CreateSolidBrush(item->style->backgroundColor); 
    118                  
    119         FillRect(lpDrawItem->hDC, &lpDrawItem->rcItem, bgBrush); 
     116        CMemDC dc(lpDrawItem->hDC, &lpDrawItem->rcItem); 
     117 
     118        dc.FillSolidRect(&lpDrawItem->rcItem, item->style->backgroundColor); 
    120119 
    121120        if (item->bitmap != 0) { 
     
    123122                memDC.CreateCompatibleDC(0); 
    124123                CBitmapHandle bmh = memDC.SelectBitmap(item->bitmap); 
    125                 BitBlt(lpDrawItem->hDC, lpDrawItem->rcItem.left, lpDrawItem->rcItem.top, lpDrawItem->rcItem.right-lpDrawItem->rcItem.left, lpDrawItem->rcItem.bottom-lpDrawItem->rcItem.top, memDC, 0, 0, SRCCOPY); 
     124                dc.BitBlt(lpDrawItem->rcItem.left, lpDrawItem->rcItem.top, lpDrawItem->rcItem.right-lpDrawItem->rcItem.left, lpDrawItem->rcItem.bottom-lpDrawItem->rcItem.top, memDC, 0, 0, SRCCOPY); 
    126125                memDC.SelectBitmap(bmh); 
    127126        } 
     
    135134        rc.bottom -= item->style->textTop; 
    136135 
    137         CDCHandle dc(lpDrawItem->hDC); 
    138136        CFontHandle prevFont = dc.SelectFont(item->style->font); 
    139137        dc.SetBkMode(TRANSPARENT);