Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/38.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 在listview中绘制3个图像和文本_C++_Winapi_Visual C++ - Fatal编程技术网

C++ 在listview中绘制3个图像和文本

C++ 在listview中绘制3个图像和文本,c++,winapi,visual-c++,C++,Winapi,Visual C++,我没有使用mfc 我为表中显示的数据创建自己的列表视图 hListView = CreateWindowEx(0, WC_LISTVIEW, NULL, WS_CHILD | WS_VISIBLE | LVS_REPORT | LVS_EDITLABELS, 0, 0, h_rcl.right - h_rcl.left, h_rcl.bottom - h_rcl.top, hwnd_main, (HMENU)1000, hInstance, NULL); 但在其中一列中,我想显

我没有使用mfc

我为表中显示的数据创建自己的列表视图

hListView = CreateWindowEx(0, WC_LISTVIEW, NULL, WS_CHILD | WS_VISIBLE | LVS_REPORT |
    LVS_EDITLABELS, 0, 0, h_rcl.right - h_rcl.left, h_rcl.bottom - h_rcl.top,
    hwnd_main, (HMENU)1000, hInstance, NULL);
但在其中一列中,我想显示如下数据:

Text | Text of c,因为我想放一个img

所以我的桌子看起来像:

# | column1 | column 2
1 | "text <img> | text <img>" | text
您可以:

启用LVS_EX_SUBITEMIMAGES窗口样式,然后在与ListView关联的ImageList中指定每项每列图像索引

ListView项目

ListView_SetItemText(hListView, items_num, 1, "test");