Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Triple context menu item (Read 2089 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Triple context menu item

Hi!

Why does the flg code add three menu items istead of one? (they are the same)

class contextmenu_CF : public menu_item_context
{
public:
   virtual unsigned get_num_items()
                {return 1;}
   virtual void enum_item(unsigned n,string_base & out)
   {
      out = "Copy selected files...";
   }
   virtual void context_command(unsigned n,const ptr_list_base<metadb_handle> & data,const GUID&)
   {
      if (core_api::assert_main_thread())
         MessageBox(0,"","",MB_OK);
   }
};
static service_factory_single_t<menu_item,contextmenu_CF> foo;