针对第一个问题,我曾经用过一个投机取巧的办法,就是在 ListView 的 MouseDown 里面加入一个 PostMessage 函数,发送一个WM_LBUTTONUP 消息,这样子的句鼠标既可以选中某一个项目,却又进入不了拖动状态。不知道还有没有别的方法,各位可以谈一下。

解决方案 »

  1.   

    第一个问题可以将OLE拖动设为自动,第二个不知道!
      

  2.   

    一,把OlEGragMode设置为0即可显示图标的拖动。
    二,在listview中要实现资源管理其中那样的功能的话只能做两张图片:一张是选中时蓝色的,一张是原色的,当选中项目是再进行图片的切换。
      

  3.   

    第一个问题已解决对于 第二个问题
    kingyuhan(宇寒) 的方法不够好,ListView还会绘制选择的杂点一次的
    现在好多软件的ListView的选择图标都是整体变蓝
    如FlashGet我觉得应该是发一个消息,修改ListView的属性,可不知道是哪一个
      

  4.   

    ListView好象可以有标准图像、热图像、禁用图像三个图像列表嘛!
      

  5.   

    是ImageList的关系,VB中的ImageList创建的时候不是真彩色的原因不信你把显示属性设为256色,你的资源管理器中的图标也会有杂点!我估计VB中的flags参数颜色设置的比较低!
    ImageList_CreateCreates a new image list. HIMAGELIST ImageList_Create(
        int cx, 
        int cy, 
        UINT flags, 
        int cInitial, 
        int cGrow
       );Parameters
    cx 
    Width, in pixels, of each image. 
    cy 
    Height, in pixels, of each image. 
    flags 
    Set of bit flags that specify the type of image list to create. This parameter can be a combination of the following values, but it can include only one of the ILC_COLOR values. ILC_COLOR  Use the default behavior if none of the other ILC_COLOR* flags is specified. Typically, the default is ILC_COLOR4, but for older display drivers, the default is ILC_COLORDDB. 
    ILC_COLOR4  Use a 4-bit (16-color) device-independent bitmap (DIB) section as the bitmap for the image list.  
    ILC_COLOR8  Use an 8-bit DIB section. The colors used for the color table are the same colors as the halftone palette.  
    ILC_COLOR16  Use a 16-bit (32/64k-color) DIB section. 
    ILC_COLOR24  Use a 24-bit DIB section. 
    ILC_COLOR32  Use a 32-bit DIB section. 
    ILC_COLORDDB  Use a device-dependent bitmap. 
    ILC_MASK  Use a mask. The image list contains two bitmaps, one of which is a monochrome bitmap used as a mask. If this value is not included, the image list contains only one bitmap.