我想通过创建一个listctrl列表,用来添加图片的名称和地址,然后点击列表,在一个picture control中立即显示选中的图片,请问如何做到?
给个思路也行,急求!!!

解决方案 »

  1.   

    listctrl的selectchange事件里面,取得图片信息,刷新picture control
      

  2.   

    设置为single select,处理LVN_ITEMCHANGED消息,得到选中的item;画图。
      

  3.   

    再listctrl中添加点击事件,在事件中获取选择的图片路径,然后设置到PICTURE CONTROL控件中不就行了吗?
      

  4.   

    一、定义全局变量保存相关图片信息,比如文件名称
    二、直接在OnPiant里画图,没必要用picture control,太土了
    三、响应ListCtrl控件的单击消息,获取列表文本送给全局变量,然后发送刷新消息
      

  5.   

    GetItemText Returns the text of an item. 
    SetItemText Sets the text of an item. 
    GetItemData Returns the 32-bit application-specific value associated with an item. 
    SetItemData Sets the 32-bit application-specific value associated with an item.