context menu within listviews

  • Thread starter Thread starter Justin Galzic
  • Start date Start date
J

Justin Galzic

Is there any way to insert a ContextMenu type item into a ListView as
a ListView item? Basically, I want a listview with a bunch of items
(standard ListViewItem with string values and icons to the left) but
one of them needs to have a flyout menu, similar to what you see in
the WinXP Start Menu's Control Panel and My Recent Documents. So some
items would be shown as the normal non-expandable listview items such
as 'Search' and 'Run' but then others could expand, similar to
'Control Panel and My Recent Documents' with the icon to the left and
also have the triangle icon to the right. I've examined the Start menu
with a spy toolbar and the tool tells me that the whole right side
panel is a SysListView32 so I'm assuming that what I want done is
possible. Does it involve a bunch of owner-draw code for the listview
or can it be done in a simpler way?

Thanks,
Justin
 
I don't know if it is possible to set separate context menus for items,
however you can always check on right-click which item is clicked on and set
context menu of listview accordingly

HTH
Alex
 
Back
Top