关于CListCtrl 中只显示图标,不显示文字区域的解决方法

    技术2025-03-05  46

    用CListCtrl 来显示缩略图,而不显示文字时,默认会保留文字区域,从而出现一些错误,比如,点击区域不对等;

    解决方式:

    #define LVS_EX_HIDELABELS 0x00020000 然后: DWORD dwExStyle = ListView_GetExtendedListViewStyle(m_listctrl); dwExStyle |= LVS_EX_HIDELABELS; ListView_SetExtendedListViewStyle(m_listctrl, dwExStyle);

     

    最新回复(0)