winapi - item not getting created at the end of list view control created using C++ -
i trying add item @ end of list view control getting added random location in list view control created using c++. may reason? have attached code below.
hwnd hwndlocallist = getdlgitem(hwnd, filelistname); int itemno=listview_getitemcount(hwndlocallist); lvitem lvi; memset(&lvi,0,sizeof(lvi)); lvi.mask = lvif_text | lvif_image |lvif_state; lvi.iitem = itemno; lvi.isubitem = 0; lvi.state = lvis_selected; lvi.psztext = "new folder"; lvi.iimage=0; int x=listview_insertitem(hwndlocallist, &lvi);
my psychic powers tell me have either lvs_sortascending
or lvs_sortdescending
styles set on listview control. if turn them off, item added end.
Comments
Post a Comment