炫彩界面库论坛

 找回密码
 加入我们

QQ登录

只需一步,快速开始

查看: 1662|回复: 1

XList_GetItemBindEleInfo 怎么可以取到绑定的元素

[复制链接]

该用户从未签到

发表于 2015-5-13 00:16:01 | 显示全部楼层 |阅读模式
本帖最后由 oOoOo圈圈ooOo 于 2015-5-13 00:17 编辑

我的代码如下:

void CreateListItem()
{
        HELE hList = XWnd_GetEle(m_hMainWnd, LIST_SAMPLE);

        for (int i = 0; i < 3;  i++)
        {
                XList_AddItem(hList,  L"0001");

                XList_SetItemText(hList, i, 1, L"0002");
                XList_SetItemText(hList, i, 2, L"0003");
        }

        XEle_RedrawEle(hList, TRUE);

        HELE hEdit = XEdit_Create(0, 0, 40, 22, hList);

        itemBindEle_ itemEle;

        itemEle.hEle = hEdit;
        itemEle.left = 0;
        itemEle.top = 0;
        itemEle.width = 40;
        itemEle.height = 22;

        XList_SetItemBindEle(hList, 0, 1, &itemEle);


        itemBindEle_ itemInfo = {0};  // 此处不管是初始化还是不初始化结果都一样获取不到绑定元素

        int nBindCount = XList_GetItemBindEleCount(hList, 0, 1);    // 此处可以获取到绑定元素个数(为1)

        BOOL bRet = XList_GetItemBindEleInfo(hList, 0, 1, &itemInfo, 1);  // 最后一个参数我试了-1, 0, 1, 2 都不行,获取不

                                                                                                               // 到元素, 并且返回值为FALSE
}
  • TA的每日心情
    开心
    2022-1-9 18:18
  • 发表于 2015-5-13 11:20:16 | 显示全部楼层
    旧版已经不提供技术支持,因人力有限,谢谢理解!
    您需要登录后才可以回帖 登录 | 加入我们

    本版积分规则

    QQ|Archiver|手机版|小黑屋|炫彩界面库 ( 鄂ICP备2023014763号-1 )

    GMT+8, 2024-5-2 11:52 , Processed in 0.065487 second(s), 18 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2021, Tencent Cloud.

    快速回复 返回顶部 返回列表