|
1
|
1 #pragma once
|
|
|
2
|
|
|
3 namespace listview_helper
|
|
|
4 {
|
|
|
5 unsigned insert_item(HWND p_listview,unsigned p_index,const char * p_name,LPARAM p_param);//returns index of new item on success, infinite on failure
|
|
|
6
|
|
|
7 unsigned insert_column(HWND p_listview,unsigned p_index,const char * p_name,unsigned p_width_dlu);//returns index of new item on success, infinite on failure
|
|
|
8
|
|
|
9 bool set_item_text(HWND p_listview,unsigned p_index,unsigned p_column,const char * p_name);
|
|
|
10
|
|
|
11 bool is_item_selected(HWND p_listview,unsigned p_index);
|
|
|
12
|
|
|
13 void set_item_selection(HWND p_listview,unsigned p_index,bool p_state);
|
|
|
14
|
|
|
15 bool select_single_item(HWND p_listview,unsigned p_index);
|
|
|
16
|
|
|
17 bool ensure_visible(HWND p_listview,unsigned p_index);
|
|
|
18
|
|
|
19 void get_item_text(HWND p_listview,unsigned p_index,unsigned p_column,pfc::string_base & p_out);
|
|
|
20
|
|
|
21 unsigned insert_item2(HWND p_listview, unsigned p_index, const char * col0, const char * col1, LPARAM p_param = 0);
|
|
|
22 unsigned insert_item3(HWND p_listview, unsigned p_index, const char * col0, const char * col1, const char * col2, LPARAM p_param = 0);
|
|
|
23
|
|
|
24
|
|
|
25 };
|
|
|
26
|
|
|
27 int ListView_GetFirstSelection(HWND p_listview);
|
|
|
28 int ListView_GetSingleSelection(HWND p_listview);
|
|
|
29 int ListView_GetFocusItem(HWND p_listview);
|
|
|
30 bool ListView_IsItemSelected(HWND p_listview, int p_index);
|
|
|
31
|
|
|
32 void ListView_GetContextMenuPoint(HWND p_list,LPARAM p_coords,POINT & p_point,int & p_selection);
|
|
|
33 void ListView_GetContextMenuPoint(HWND p_list,POINT p_coords,POINT & p_point,int & p_selection);
|
|
|
34
|
|
|
35 int ListView_GetColumnCount(HWND listView);
|
|
|
36
|
|
|
37 void ListView_FixContextMenuPoint(CListViewCtrl list, CPoint & coords); |