DrawItem: Called by the framework when a visual aspect of an owner-draw list box changes. itemAction: Specifies the drawing action requiredODA_DRAWENTIRE:The entire control needs to be drawn ODA_SELECT:The selection status has changed. The itemState member should be checked to determine the new selection state. itemState:Specifies the visual state of the item after the current drawing action takes place ODS_SELECTED:The menu item's status is selected if (lpDIS->itemAction & ODA_DRAWENTIRE): lpDIS->itemAction的value是否为ODA_DRAWENTIRE if ((lpDIS->itemState & ODS_SELECTED) &&(lpDIS->itemAction & (ODA_SELECT | ODA_DRAWENTIRE))): lpDIS->itemState的value为ODS_SELECTED 并且 lpDIS->itemAction的value为ODA_SELECT和ODA_DRAWENTIRE的组合 if (!(lpDIS->itemState & ODS_SELECTED) &&(lpDIS->itemAction & ODA_SELECT)) lpDIS->itemState的value为ODS_SELECTED 并且 lpDIS->itemAction的value为ODA_SELECT
Called by the framework when a visual aspect of an owner-draw list box changes. itemAction:
Specifies the drawing action requiredODA_DRAWENTIRE:The entire control needs to be drawn
ODA_SELECT:The selection status has changed. The itemState member should be checked to determine the new selection state. itemState:Specifies the visual state of the item after the current drawing action takes place
ODS_SELECTED:The menu item's status is selected if (lpDIS->itemAction & ODA_DRAWENTIRE):
lpDIS->itemAction的value是否为ODA_DRAWENTIRE
if ((lpDIS->itemState & ODS_SELECTED) &&(lpDIS->itemAction & (ODA_SELECT | ODA_DRAWENTIRE))):
lpDIS->itemState的value为ODS_SELECTED 并且
lpDIS->itemAction的value为ODA_SELECT和ODA_DRAWENTIRE的组合
if (!(lpDIS->itemState & ODS_SELECTED) &&(lpDIS->itemAction & ODA_SELECT))
lpDIS->itemState的value为ODS_SELECTED 并且
lpDIS->itemAction的value为ODA_SELECT
其中 lpDIS->itemAction&ODA_DRAWENTIRE 是什么意思
(lpDIS->itemAction&ODA_SELECT) 和 (lpDIS->itemState&ODS_SELECTED)有什么区别?我看了一下MSDN但是没太看懂,谢谢!
(CSDN今天是怎么了,老是出错,唉!)