Show the default right-click menu - Delphi

后端 未结 4 1613
你的背包
你的背包 2020-12-30 12:25

I have a Listbox which contain a list of files . can i access the Windows right-click menu in the listbox to access the open , properties , delete and rename items ?

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-30 13:12

    Kermia check the JclShell unit from the JEDI JCL library, inside of this unit exist a function called DisplayContextMenu which show the context menu associated to a file. this function encapsulate the calls to the IContextMenu interface and makes your work more easy.

    function DisplayContextMenu(const Handle: HWND; const FileName: string;
      Pos: TPoint): Boolean;
    

提交回复
热议问题