当treectrl控件带有checkbox风格时,只勾中checkbox时发生的消息应该是哪一个
当treectrl控件带有checkbox风格时,如果选中某一个checkbox,它相应的消息是什么?如果是nm_click我发现这个不是勾中checkbox的消息,而是只要选中一个item就会发生的消息。那只勾中checkbox时发生的消息应该是哪一个?谢谢大家
[解决办法]
NM_CLICK消息
CTreeCtrl::HitTest();
HTREEITEM HitTest( CPoint pt, UINT* pFlags = NULL) const;HTREEITEM HitTest( TVHITTESTINFO* pHitTestInfo ) const;typedef struct tagTVHITTESTINFO { POINT pt; UINT flags; HTREEITEM hItem;} TVHITTESTINFO, *LPTVHITTESTINFO;flagsVariable that receives information about the results of a hit test. This member can be one or more of the following values: TVHT_ABOVEAbove the client area. TVHT_BELOWBelow the client area. TVHT_NOWHEREIn the client area, but below the last item. TVHT_ONITEMOn the bitmap or label associated with an item. TVHT_ONITEMBUTTONOn the button associated with an item. TVHT_ONITEMICONOn the bitmap associated with an item. TVHT_ONITEMINDENTIn the indentation associated with an item. TVHT_ONITEMLABELOn the label (string) associated with an item. TVHT_ONITEMRIGHTIn the area to the right of an item. TVHT_ONITEMSTATEICONOn the state icon for a tree-view item that is in a user-defined state. TVHT_TOLEFTTo the left of the client area. TVHT_TORIGHTTo the right of the client area.
[解决办法]
http://www.vckbase.com/document/viewdoc/?id=665