Switch $nWndFrom Case $nWndListView Switch $iCode Case $NM_RCLICK Local $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam) Local $iIndex = DllStructGetData($tInfo, "Index") If $iIndex <> -1 Then _ContextMenu($iIndex) My code looks like this and what it does is it calls a function that creates a a context menu that says 'whatever' What if I want to add another context menu when I right click? Would it be like this? Switch $nWndFrom Case $nWndListView