/[winpt]/trunk/Src/wptListView.cpp
ViewVC logotype

Diff of /trunk/Src/wptListView.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 181 by twoaday, Tue Mar 14 11:01:22 2006 UTC revision 193 by twoaday, Sat Apr 1 12:36:35 2006 UTC
# Line 67  listview_release (listview_ctrl_t ctx) Line 67  listview_release (listview_ctrl_t ctx)
67      if (ctx->hil)      if (ctx->hil)
68          ImageList_Destroy (ctx->hil);          ImageList_Destroy (ctx->hil);
69      delete ctx;      delete ctx;
70  } /* listview_release */  }
71    
72    
73    int
74    listview_set_column_width (listview_ctrl_t ctx, int col, int width)
75    {
76        LVCOLUMN lvc;
77    
78        memset (&lvc, 0, sizeof (lvc));
79        lvc.mask = LVCF_WIDTH;
80        lvc.cx = width;
81        ListView_SetColumn (ctx->ctrl, col, &lvc);
82        return 0;
83    }
84    
85    
86  int  int
# Line 248  listview_del_all_items (listview_ctrl_t Line 261  listview_del_all_items (listview_ctrl_t
261  }  }
262    
263    
264    /* Return the index of the selected item.
265       Support both selections and checkboxes. */
266    int
267    listview_get_selected_item (listview_ctrl_t lv)
268    {
269        int pos, i;
270        
271        pos = listview_get_curr_pos (lv);
272        if (pos != -1)
273            return pos;
274        for (i=0; i < listview_count_items (lv, 0); i++) {
275            if (listview_get_item_state (lv, i))
276                return i;
277        }
278        return -1;
279    }
280    
281    
282  /* Return if the given element is selected or if the ext  /* Return if the given element is selected or if the ext
283     style is used, if the checkbox is activated. */     style is used, if the checkbox is activated. */
284  int  int

Legend:
Removed from v.181  
changed lines
  Added in v.193

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26