当响应List Control的LVN_ITEMCHANGED消息时,系统会传来一个PNMHDR参数,我看vc自动生成一行代码,把PNMHDR改成(NM_LISTVIEW*)型,我想知道NM_LISTVIEW这种结构的定义,说不定对我有用,我的msdn中没有,哪位有的贴一下好吗?另外顺便问题一个简单问题,也不知道为什么,一个工程,用着用着就不能编译debug版了,从设置里面添加也不行,配置里面也没有,下拉菜单都灰了。怎么才能使工程重新能编译debuf版?

解决方案 »

  1.   

    #define NM_LISTVIEW     NMLISTVIEWtypedef struct tagNMLISTVIEW
    {
        NMHDR   hdr;
        int     iItem;
        int     iSubItem;
        UINT    uNewState;
        UINT    uOldState;
        UINT    uChanged;
        POINT   ptAction;
        LPARAM  lParam;
    } NMLISTVIEW, FAR *LPNMLISTVIEW;
      

  2.   

    MSDN:NMLISTVIEW
    This structure contains information about a list view notification message. This structure is the same as the NM_LISTVIEW structure, but has been renamed to fit standard naming conventions. typedef struct tagNMLISTVIEW{
    NMHDR hdr;
    int iItem;
    int iSubItem;
    UINT uNewState;
    UINT uOldState;
    UINT uChanged;
    POINT ptAction;
    LPARAM lParam;} 
    NMLISTVIEW, FAR *LPNMLISTVIEW;
    Members
    hdr 
    NMHDR structure that contains information about this notification message. 
    iItem 
    Identifier of the list view item, or -1 if not used. 
    iSubItem 
    Identifier of the subitem, or zero if none. 
    uNewState 
    Specifies the new item state. This member is zero for notification messages that do not use it. 
    uOldState 
    Specifies the old item state. This member is zero for notification messages that do not use it. 
    uChanged 
    Set of flags that indicate the item attributes that have changed. This member is zero for notification messages that do not use it. Otherwise, it can have the same values as the mask member of the LVITEM structure. 
    ptAction 
    Specifies a POINT structure that indicates the location at which the event occurred. This member is undefined for notification messages that do not use it. 
    lParam 
    Specifies the item’s application-defined 32-bit value. This member is undefined for notification messages that do not use it. 
    RequirementsRuns on Versions Defined in Include Link to 
    Windows CE OS 2.0 and later Commctrl.h     Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
      

  3.   

    这个消息的处理会有一点小小的插曲,详细内容见msdn.
      

  4.   

    你可以将光标停在这个结构上,然后点击右键,选择Goto Define of ...就可以看到这个结构的定义了。
      

  5.   

    把*.aps  *.clw  *.opt  *.ncb 删掉
    然后打开工程
    Ctrl+W
    弹出的对话框全选OK如果还不行的话就再建一个空工程
    然后把文件添加到这个空工程
    再设置一个相应的设置,如连接的库什么的
      

  6.   

    第二问:添加Debug 或其它自定义选择主菜单->Build->Configurations->Add,
    以下自己看着办吧..