dantay9 Posted June 27, 2009 Posted June 27, 2009 I am trying to delete an item in a list view control. I am using _GUICtrlListView_DeleteItem on line 138. The line won't delete itself, but the _GUICtrlListView_SetItemText does work so it isn't the index. The $Clicked item comes from the WM_Notify function. It is the index of the item right clicked on in the list view. Why doesn't the index clicked on delete?Shutdown_GUI.au3
Yoriz Posted June 27, 2009 Posted June 27, 2009 Try changing your delete line to the following _GUICtrlListView_DeleteItem(GUICtrlGetHandle($ListView_Run), $Clicked_Item) GDIPlusDispose - A modified version of GDIPlus that auto disposes of its own objects before shutdown of the Dll using the same function Syntax as the original.EzMySql UDF - Use MySql Databases with autoit with syntax similar to SQLite UDF.
dantay9 Posted June 27, 2009 Author Posted June 27, 2009 That worked, but I don't know why. The GUICtrlCreateListView should have returned the handle(control ID) to the list view. Do you know why it worked?
Authenticity Posted June 27, 2009 Posted June 27, 2009 A subtle difference which is not documented but is visible through reading the library code. If you use GUICtrlCreateListViewItem() the lparam of the LV_ITEM of the new item is it's @CtrlID. If you use _GUICtrListView_InsertItem() or _GUICtrlListView_AddItem() the lparam is by default 0. _GUICtrlListView_DeleteItem() use GUICtrlDelete() if the list view item lparam is not 0 but it should be 0 in your case, or I'm totally wrong
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now