// Will eventually need to set the image handle somewhere into vItem.hItem
//
rItem.afStyle |= MIS_OWNERDRAW;
- pData = (BYTE*)pItem;
+ pData = (BYTE*)NULL;
rItem.hItem = (HBITMAP)pItem->GetBitmap().GetHBITMAP();
pItem->m_vMenuData.afStyle = rItem.afStyle;
pItem->m_vMenuData.hItem = rItem.hItem;
//
// If we're already attached to the menubar, we must update it
//
- if (IsAttached())
+ if (IsAttached() && m_menuBar->IsAttached())
{
m_menuBar->Refresh();
}
,MPFROM2SHORT(pItem->GetId(), TRUE)
,(MPARAM)0
);
- if (IsAttached())
+ if (IsAttached() && m_menuBar->IsAttached())
{
//
// Otherwise, the chane won't be visible