+ if (pMeasureStruct->fsAttribute & MIA_HILITED)
+ {
+ //
+ // If it is currently selected we let the system handle it
+ //
+ eStatus |= wxOwnerDrawn::wxODSelected;
+ }
+ if (pMeasureStruct->fsAttribute & MIA_CHECKED)
+ {
+ //
+ // If it is currently checked we draw our own
+ //
+ eStatus |= wxOwnerDrawn::wxODChecked;
+ pMeasureStruct->fsAttributeOld = pMeasureStruct->fsAttribute &= ~MIA_CHECKED;
+ }
+ if (pMeasureStruct->fsAttribute & MIA_DISABLED)
+ {
+ //
+ // If it is currently disabled we let the system handle it
+ //
+ eStatus |= wxOwnerDrawn::wxODDisabled;
+ }
+ //
+ // Don't really care about framed (indicationg focus) or NoDismiss
+ //
+ }
+ else
+ {
+ if (pMeasureStruct->fsAttribute & MIA_HILITED)
+ {
+ eAction = wxOwnerDrawn::wxODDrawAll;
+ eStatus |= wxOwnerDrawn::wxODSelected;
+ //
+ // Keep the system from trying to highlight with its bogus colors
+ //
+ pMeasureStruct->fsAttributeOld = pMeasureStruct->fsAttribute &= ~MIA_HILITED;
+ }
+ else if (!(pMeasureStruct->fsAttribute & MIA_HILITED))
+ {
+ eAction = wxOwnerDrawn::wxODDrawAll;
+ eStatus = 0;
+ //
+ // Keep the system from trying to highlight with its bogus colors
+ //
+ pMeasureStruct->fsAttribute = pMeasureStruct->fsAttributeOld &= ~MIA_HILITED;
+ }
+ else
+ {
+ //
+ // For now we don't care about anything else
+ // just ignore the entire message!
+ //
+ return TRUE;
+ }
+ }
+ //
+ // Now redraw the item
+ //
+ return(pMenuItem->OnDrawItem( vDc
+ ,vRect
+ ,(wxOwnerDrawn::wxODAction)eAction
+ ,(wxOwnerDrawn::wxODStatus)eStatus
+ ));