Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to add a double click function to a single item in the clistctrl

Status
Not open for further replies.

kaya17

Programmer
Feb 9, 2004
78
SG
i have a clistctrl object with the "report" type.

and what i want is that when the user double clicks a single item(not the whole list or the column), a dialog will pop out.

what should i do to accomplish this?


thanks!

kaya
 
may i know which method is it?
i tried the double click method (NM_DBLCLK), but it is for the whole list, that is wherever i clicked in the list, it will pop out the dialog. but what i want is a single item, that is when i click different items, different dialog boxes will pop out depending on which item i click.....

any other suggestions?

thanks!

regards,
kaya


 
With a bit of research, you discover:

NM_DBLCLK (list view)
Parameters
lpnmitem
Version 4.71. Address of an [blue]NMITEMACTIVATE[/blue] structure that contains additional information about this notification message. The iItem, iSubItem, and ptAction members of this structure contain information about the item.

So just use that structure, and "iItem" will indicate which item was double-clicked.

I REALLY hope that helps.
Will
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top