lpDIS->itemAction和lpDIS->itemState分别代表什么情况

解决方案 »

  1.   

    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
      

  2.   

    重载CListBox的DarwItem(LPDRAWITEMSTRUCT  lpDIS)  
    其中  lpDIS->itemAction&ODA_DRAWENTIRE  是什么意思  
    (lpDIS->itemAction&ODA_SELECT)  和  (lpDIS->itemState&ODS_SELECTED)有什么区别?我看了一下MSDN但是没太看懂,谢谢! 
    (CSDN今天是怎么了,老是出错,唉!)
      

  3.   

    cool29() 对不起,我结贴时,你还没回答问题,你可以跟这个贴子,这会给你分的。
      

  4.   

    cool29() 对不起,我结贴时,你还没回答问题,你可以跟这个贴子,这会给你分的。