CListCtrl 中使用 DrawItem MeasureItem 注意事项

来源:互联网 发布:2017彩票网络销售恢复 编辑:程序博客网 时间:2024/05/16 08:27
//-- declaration
protected:
    //{{AFX_MSG(CMyListCtrl)
    afx_msg void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct);   //-- Message
    //}}AFX_MSG
    virtual void DrawItem( LPDRAWITEMSTRUCT lpDrawItemStruct );    //reride

//-- Message macro
BEGIN_MESSAGE_MAP(C_ImageListCtrl, CListCtrl)
    ON_WM_MEASUREITEM_REFLECT()
END_MESSAGE_MAP()

//-- Create attend the style  LVS_OWNERDRAWFIXED . if had no added style LVS_OWNERDRAWFIXED that the drawitem function can't be called.
原创粉丝点击