• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ Menu_AddContactMenuItem函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中Menu_AddContactMenuItem函数的典型用法代码示例。如果您正苦于以下问题:C++ Menu_AddContactMenuItem函数的具体用法?C++ Menu_AddContactMenuItem怎么用?C++ Menu_AddContactMenuItem使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了Menu_AddContactMenuItem函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: SystemModulesLoaded

int SystemModulesLoaded(WPARAM, LPARAM)
{
	//Insert "Check mail (YAMN)" item to Miranda's menu
	CLISTMENUITEM mi = { sizeof(mi) };
	mi.position = 0xb0000000;
	mi.icolibItem = g_GetIconHandle(0);
	mi.pszName = LPGEN("Check &mail (All Account)");
	mi.pszPopupName = NULL;//YAMN_DBMODULE;
	mi.pszService = MS_YAMN_FORCECHECK;
	hMenuItemMain = Menu_AddMainMenuItem(&mi);

	mi.pszName = LPGEN("Check &mail (This Account)");
	mi.pszContactOwner = YAMN_DBMODULE;
	mi.pszService = MS_YAMN_CLISTCONTEXT;
	hMenuItemCont = Menu_AddContactMenuItem(&mi);

	mi.icolibItem = g_GetIconHandle(1);
	mi.pszName = LPGEN("Launch application");
	mi.pszContactOwner = YAMN_DBMODULE;
	mi.pszService = MS_YAMN_CLISTCONTEXTAPP;
	hMenuItemContApp = Menu_AddContactMenuItem(&mi);

	CheckMenuItems();

	if (hAccountFolder = FoldersRegisterCustomPathT(LPGEN("YAMN"), LPGEN("YAMN Account Folder"), UserDirectory))
		FoldersGetCustomPathT(hAccountFolder, UserDirectory, MAX_PATH, UserDirectory);

	RegisterPOP3Plugin(0, 0);
	return 0;
}
开发者ID:martok,项目名称:miranda-ng,代码行数:30,代码来源:main.cpp


示例2: debugLog

void CSametimeProto::InitConferenceMenu()
{
	debugLog(_T("CSametimeProto::InitConferenceMenu()"));

	CreateProtoService(MS_SAMETIME_MENULEAVECHAT, &CSametimeProto::onMenuLeaveChat);
	CreateProtoService(MS_SAMETIME_MENUCREATECHAT, &CSametimeProto::onMenuCreateChat);

	char service[128];

	CLISTMENUITEM mi = { sizeof(mi) };
	mi.flags = CMIF_TCHAR | CMIF_NOTOFFLINE;
	mi.pszContactOwner = m_szModuleName;
	
	mi.ptszName = LPGENT("Leave conference");
	mir_snprintf(service, SIZEOF(service), "%s%s", m_szModuleName, MS_SAMETIME_MENULEAVECHAT);
	mi.pszService = service;
	mi.icolibItem = GetIconHandle(IDI_ICON_LEAVE);
	hLeaveChatMenuItem = Menu_AddContactMenuItem(&mi);

	mi.ptszName = LPGENT("Start conference");
	mir_snprintf(service, SIZEOF(service), "%s%s", m_szModuleName, MS_SAMETIME_MENUCREATECHAT);
	mi.pszService = service;
	mi.icolibItem = GetIconHandle(IDI_ICON_INVITE);
	hCreateChatMenuItem = Menu_AddContactMenuItem(&mi);

	HookProtoEvent(ME_CLIST_PREBUILDCONTACTMENU, &CSametimeProto::PrebuildContactMenu);
}
开发者ID:martok,项目名称:miranda-ng,代码行数:27,代码来源:conference.cpp


示例3: SystemModulesLoaded

int SystemModulesLoaded(WPARAM, LPARAM)
{
	//Insert "Check mail (YAMN)" item to Miranda's menu
	CMenuItem mi;
	
	SET_UID(mi, 0xa01ff3d9, 0x53cb, 0x4406, 0x85, 0xd9, 0xf1, 0x90, 0x3a, 0x94, 0xed, 0xf4);
	mi.position = 0xb0000000;
	mi.hIcolibItem = g_GetIconHandle(0);
	mi.name.a = LPGEN("Check &mail (All Account)");
	mi.pszService = MS_YAMN_FORCECHECK;
	hMenuItemMain = Menu_AddMainMenuItem(&mi);

	SET_UID(mi, 0xfe22191f, 0x40c8, 0x479f, 0x93, 0x5d, 0xa5, 0x17, 0x1f, 0x57, 0x2f, 0xcb);
	mi.name.a = LPGEN("Check &mail (This Account)");
	mi.pszService = MS_YAMN_CLISTCONTEXT;
	hMenuItemCont = Menu_AddContactMenuItem(&mi, YAMN_DBMODULE);

	SET_UID(mi, 0x147c7800, 0x12d0, 0x4209, 0xab, 0xcc, 0xfa, 0x64, 0xc6, 0xb0, 0xa6, 0xeb);
	mi.hIcolibItem = g_GetIconHandle(1);
	mi.name.a = LPGEN("Launch application");
	mi.pszService = MS_YAMN_CLISTCONTEXTAPP;
	hMenuItemContApp = Menu_AddContactMenuItem(&mi, YAMN_DBMODULE);

	CheckMenuItems();

	if (hAccountFolder = FoldersRegisterCustomPathT(LPGEN("YAMN"), LPGEN("YAMN Account Folder"), UserDirectory))
		FoldersGetCustomPathT(hAccountFolder, UserDirectory, MAX_PATH, UserDirectory);

	RegisterPOP3Plugin(0, 0);
	return 0;
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:31,代码来源:main.cpp


示例4: GetIconHandle

void WhatsAppProto::InitContactMenus()
{
	::HookEvent(ME_CLIST_PREBUILDCONTACTMENU, PrebuildContactMenu);

	CLISTMENUITEM mi = {sizeof(mi)};

	mi.position = -2000006100;
	mi.icolibItem = GetIconHandle("leaveGroup");
	mi.pszName = GetIconDescription("leaveGroup");
	mi.pszService = "WhatsAppProto/LeaveGroup";
	CreateServiceFunction(mi.pszService,GlobalService<&WhatsAppProto::OnLeaveGroup>);
	g_hContactMenuItems[CMI_LEAVE_GROUP] = Menu_AddContactMenuItem(&mi);

	mi.position = -2000006100;
	mi.icolibItem = GetIconHandle("leaveAndDeleteGroup");
	mi.pszName = GetIconDescription("leaveAndDeleteGroup");
	g_hContactMenuItems[CMI_REMOVE_GROUP] = Menu_AddContactMenuItem(&mi);

	mi.position = -2000006099;
	mi.icolibItem = GetIconHandle("changeGroupSubject");
	mi.pszName = GetIconDescription("changeGroupSubject");
	mi.pszService = "WhatsAppProto/ChangeGroupSubject";
	CreateServiceFunction(mi.pszService,GlobalService<&WhatsAppProto::OnChangeGroupSubject>);
	g_hContactMenuItems[CMI_CHANGE_GROUP_SUBJECT] = Menu_AddContactMenuItem(&mi);
}
开发者ID:MrtsComputers,项目名称:miranda-ng,代码行数:25,代码来源:theme.cpp


示例5: InitMenu

void InitMenu()
{
	CMenuItem mi(g_plugin);
	mi.flags = CMIF_UNICODE | CMIF_NOTOFFLINE;
	mi.root = g_plugin.addRootMenu(MO_MAIN, LPGENW("News Aggregator"), 500099000);
	Menu_ConfigureItem(mi.root, MCI_OPT_UID, "D9733E4F-1946-4390-8EB3-591E8687222E");

	SET_UID(mi, 0x3ec91864, 0xefa7, 0x4994, 0xb7, 0x75, 0x6c, 0x96, 0xcb, 0x29, 0x2f, 0x93);
	mi.position = 10100001;
	if (db_get_b(NULL, MODULENAME, "AutoUpdate", 1))
		mi.name.w = LPGENW("Auto Update Enabled");
	else
		mi.name.w = LPGENW("Auto Update Disabled");
	mi.hIcolibItem = GetIconHandle("main");
	mi.pszService = MS_NEWSAGGREGATOR_ENABLED;
	hService2[0] = Menu_AddMainMenuItem(&mi);

	SET_UID(mi, 0x8076bb4d, 0x1e44, 0x43af, 0x97, 0x1e, 0x31, 0xd8, 0xa4, 0xe9, 0xb8, 0x37);
	mi.position = 20100001;
	mi.name.w = LPGENW("Check All Feeds");
	mi.pszService = MS_NEWSAGGREGATOR_CHECKALLFEEDS;
	hService2[1] = Menu_AddMainMenuItem(&mi);

	SET_UID(mi, 0xb876484d, 0x28aa, 0x4e03, 0x9e, 0x98, 0xed, 0xbc, 0xd1, 0xcf, 0x31, 0x80);
	mi.position = 20100002;
	mi.hIcolibItem = GetIconHandle("addfeed");
	mi.name.w = LPGENW("Add Feed");
	mi.pszService = MS_NEWSAGGREGATOR_ADDFEED;
	hService2[2] = Menu_AddMainMenuItem(&mi);

	SET_UID(mi, 0x600bf2c2, 0xa974, 0x44d3, 0x98, 0xf9, 0xe6, 0x65, 0x7c, 0x1f, 0x63, 0x37);
	mi.position = 20100003;
	mi.hIcolibItem = GetIconHandle("importfeeds");
	mi.name.w = LPGENW("Import Feeds");
	mi.pszService = MS_NEWSAGGREGATOR_IMPORTFEEDS;
	hService2[3] = Menu_AddMainMenuItem(&mi);

	SET_UID(mi, 0xc09c8119, 0x64c2, 0x49bd, 0x81, 0xf, 0x54, 0x20, 0x69, 0xd7, 0x30, 0xcf);
	mi.position = 20100004;
	mi.hIcolibItem = GetIconHandle("exportfeeds");
	mi.name.w = LPGENW("Export Feeds");
	mi.pszService = MS_NEWSAGGREGATOR_EXPORTFEEDS;
	hService2[4] = Menu_AddMainMenuItem(&mi);

	// adding contact menu items
	SET_UID(mi, 0x92be499c, 0x928c, 0x4789, 0x8f, 0x36, 0x28, 0xa2, 0x9f, 0xb7, 0x1a, 0x97);
	mi.root = nullptr;
	mi.position = -0x7FFFFFFA;
	mi.hIcolibItem = GetIconHandle("checkfeed");
	mi.name.w = LPGENW("Check feed");
	mi.pszService = MS_NEWSAGGREGATOR_CHECKFEED;
	hService2[5] = Menu_AddContactMenuItem(&mi, MODULENAME);

	SET_UID(mi, 0x41a70fbc, 0x9241, 0x44c0, 0x90, 0x90, 0x87, 0xd2, 0xc5, 0x9f, 0xc9, 0xac);
	mi.name.w = LPGENW("Change feed");
	mi.pszService = MS_NEWSAGGREGATOR_CHANGEFEED;
	hService2[6] = Menu_AddContactMenuItem(&mi, MODULENAME);

	Menu_ModifyItem(hService2[0], nullptr, GetIconHandle(db_get_b(NULL, MODULENAME, "AutoUpdate", 1) ? "enabled" : "disabled"));
}
开发者ID:tweimer,项目名称:miranda-ng,代码行数:60,代码来源:Menus.cpp


示例6: LoadFavoriteContactMenu

int LoadFavoriteContactMenu()
{
	Icon_Register(g_hInst, LPGEN("Contact list"), iconList, _countof(iconList));

	CreateServiceFunction(CLUI_FAVSETRATE, FAV_SetRate);
	CreateServiceFunction(CLUI_FAVTOGGLESHOWOFFLINE, FAV_ToggleShowOffline);
	HookEvent(ME_CLIST_PREBUILDCONTACTMENU, FAV_OnContactMenuBuild);

	CMenuItem mi;
	SET_UID(mi, 0xf99a2320, 0xc024, 0x48bd, 0x81, 0xf7, 0x9f, 0xa2, 0x5, 0xb0, 0x7f, 0xdc);
	mi.name.t = FAVMENUROOTNAME;
	mi.flags = CMIF_TCHAR;
	hFavoriteContactMenu = Menu_AddContactMenuItem(&mi);
	Menu_ConfigureItem(hFavoriteContactMenu, MCI_OPT_UNIQUENAME, "ModernClistMenu_ContactRate");

	UNSET_UID(mi);
	mi.root = hFavoriteContactMenu;
	mi.flags = CMIF_TCHAR | CMIF_SYSTEM; // not included into new menu settings
	mi.pszService = CLUI_FAVSETRATE;
	for (int i = 0; i < _countof(rates); i++) {
		mi.hIcolibItem = iconList[i].hIcolib;
		mi.name.t = rates[i];
		hFavoriteContactMenuItems[i] = Menu_AddContactMenuItem(&mi);
		Menu_ConfigureItem(hFavoriteContactMenuItems[i], MCI_OPT_EXECPARAM, i);
	}

	mi.hIcolibItem = NULL;
	mi.pszService = CLUI_FAVTOGGLESHOWOFFLINE;
	mi.position = -100000000;
	mi.name.t = LPGENT("Show even if offline");
	hShowIfOflineItem = Menu_AddContactMenuItem(&mi);
	Menu_ConfigureItem(hShowIfOflineItem, MCI_OPT_EXECPARAM, _countof(rates) + 100000000);
	return 0;
}
开发者ID:kxepal,项目名称:miranda-ng,代码行数:34,代码来源:modern_clistmenus.cpp


示例7: LoadAwayMsgModule

int LoadAwayMsgModule(void)
{
	hWindowList = WindowList_Create();
	hWindowList2 = WindowList_Create();

	CMenuItem mi;
	mi.flags = CMIF_TCHAR;

	CreateServiceFunction(MS_AWAYMSG_SHOWAWAYMSG, GetMessageCommand);
	mi.position = -2000005000;
	mi.name.t = LPGENT("Re&ad Away message");
	mi.pszService = MS_AWAYMSG_SHOWAWAYMSG;
	hAwayMsgMenuItem = Menu_AddContactMenuItem(&mi);

	CreateServiceFunction(MS_SIMPLESTATUSMSG_COPYMSG, CopyAwayMsgCommand);
	mi.position = -2000006000;
	mi.hIcolibItem = GetIconHandle(IDI_COPY);
	mi.name.t = LPGENT("Copy Away message");
	mi.pszService = MS_SIMPLESTATUSMSG_COPYMSG;
	hCopyMsgMenuItem = Menu_AddContactMenuItem(&mi);

	CreateServiceFunction(MS_SIMPLESTATUSMSG_GOTOURLMSG, GoToURLMsgCommand);
	mi.position = -2000007000;
	mi.hIcolibItem = GetIconHandle(IDI_GOTOURL);
	mi.name.t = LPGENT("&Go to URL in Away message");
	mi.pszService = MS_SIMPLESTATUSMSG_GOTOURLMSG;
	hGoToURLMenuItem = Menu_AddContactMenuItem(&mi);

	HookEvent(ME_CLIST_PREBUILDCONTACTMENU, AwayMsgPreBuildMenu);

	return 0;
}
开发者ID:kmdtukl,项目名称:miranda-ng,代码行数:32,代码来源:awaymsg.cpp


示例8: ModulesLoaded

static int ModulesLoaded(WPARAM, LPARAM)
{
	LoadChatIcons();

	HookEvent(ME_SMILEYADD_OPTIONSCHANGED, SmileyOptionsChanged);
	HookEvent(ME_CLIST_PREBUILDCONTACTMENU, PrebuildContactMenu);

	CMenuItem mi;
	SET_UID(mi, 0x2bb76d5, 0x740d, 0x4fd2, 0x8f, 0xee, 0x7c, 0xa4, 0x5a, 0x74, 0x65, 0xa6);
	mi.position = -2000090001;
	mi.flags = CMIF_DEFAULT;
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_CHAT_JOIN);
	mi.name.a = LPGEN("&Join chat");
	mi.pszService = "GChat/JoinChat";
	hJoinMenuItem = Menu_AddContactMenuItem(&mi);

	SET_UID(mi, 0x72b7440b, 0xd2db, 0x4e22, 0xa6, 0xb1, 0x2, 0xd0, 0x96, 0xee, 0xad, 0x88);
	mi.position = -2000090000;
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_CHAT_LEAVE);
	mi.flags = CMIF_NOTOFFLINE;
	mi.name.a = LPGEN("&Leave chat");
	mi.pszService = "GChat/LeaveChat";
	hLeaveMenuItem = Menu_AddContactMenuItem(&mi);

	chatApi.SetAllOffline(TRUE, NULL);
	return 0;
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:27,代码来源:chat_svc.cpp


示例9: LoadAwayMsgModule

int LoadAwayMsgModule(void)
{
	hWindowList = WindowList_Create();
	hWindowList2 = WindowList_Create();

	CMenuItem mi;
	mi.flags = CMIF_TCHAR;

	SET_UID(mi, 0xd3282acc, 0x9ff1, 0x4ede, 0x8a, 0x1e, 0x36, 0x72, 0x3f, 0x44, 0x4f, 0x84);
	CreateServiceFunction(MS_AWAYMSG_SHOWAWAYMSG, GetMessageCommand);
	mi.position = -2000005000;
	mi.name.t = LPGENT("Re&ad Away message");
	mi.pszService = MS_AWAYMSG_SHOWAWAYMSG;
	hAwayMsgMenuItem = Menu_AddContactMenuItem(&mi);

	SET_UID(mi, 0x311124e9, 0xb477, 0x42ef, 0x84, 0xd2, 0xc, 0x6c, 0x50, 0x3f, 0x4a, 0x84);
	CreateServiceFunction(MS_SIMPLESTATUSMSG_COPYMSG, CopyAwayMsgCommand);
	mi.position = -2000006000;
	mi.hIcolibItem = GetIconHandle(IDI_COPY);
	mi.name.t = LPGENT("Copy Away message");
	mi.pszService = MS_SIMPLESTATUSMSG_COPYMSG;
	hCopyMsgMenuItem = Menu_AddContactMenuItem(&mi);

	SET_UID(mi, 0xe2c75070, 0x455d, 0x455f, 0xbf, 0x53, 0x86, 0x64, 0xbc, 0x14, 0xa1, 0xbe);
	CreateServiceFunction(MS_SIMPLESTATUSMSG_GOTOURLMSG, GoToURLMsgCommand);
	mi.position = -2000007000;
	mi.hIcolibItem = GetIconHandle(IDI_GOTOURL);
	mi.name.t = LPGENT("&Go to URL in Away message");
	mi.pszService = MS_SIMPLESTATUSMSG_GOTOURLMSG;
	hGoToURLMenuItem = Menu_AddContactMenuItem(&mi);

	HookEvent(ME_CLIST_PREBUILDCONTACTMENU, AwayMsgPreBuildMenu);

	return 0;
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:35,代码来源:awaymsg.cpp


示例10: ModulesLoaded

static int ModulesLoaded(WPARAM, LPARAM)
{
	LoadChatIcons();

	HookEvent(ME_SMILEYADD_OPTIONSCHANGED, SmileyOptionsChanged);
	HookEvent(ME_CLIST_PREBUILDCONTACTMENU, PrebuildContactMenu);

	CLISTMENUITEM mi = { sizeof(mi) };
	mi.position = -2000090001;
	mi.flags = CMIF_DEFAULT;
	mi.icolibItem = LoadSkinnedIconHandle(SKINICON_CHAT_JOIN);
	mi.pszName = LPGEN("&Join chat");
	mi.pszService = "GChat/JoinChat";
	hJoinMenuItem = Menu_AddContactMenuItem(&mi);

	mi.position = -2000090000;
	mi.icolibItem = LoadSkinnedIconHandle(SKINICON_CHAT_LEAVE);
	mi.flags = CMIF_NOTOFFLINE;
	mi.pszName = LPGEN("&Leave chat");
	mi.pszService = "GChat/LeaveChat";
	hLeaveMenuItem = Menu_AddContactMenuItem(&mi);

	ci.SetAllOffline(TRUE, NULL);
	return 0;
}
开发者ID:Ganster41,项目名称:miranda-ng,代码行数:25,代码来源:chat_svc.cpp


示例11: HookEvent

void CSkypeProto::InitMenus()
{
	HookEvent(ME_CLIST_PREBUILDCONTACTMENU, &CSkypeProto::PrebuildContactMenu);

	//hChooserMenu = Menu_AddObject("SkypeAccountChooser", LPGEN("Skype menu chooser"), 0, "Skype/MenuChoose");

	CMenuItem mi;
	mi.flags = CMIF_TCHAR;

	// Request authorization
	mi.pszService = MODULE"/RequestAuth";
	mi.name.t = LPGENT("Request authorization");
	mi.position = CMI_POSITION + CMI_AUTH_REQUEST;
	mi.hIcolibItem = ::Skin_GetIconHandle(SKINICON_AUTH_REQUEST);
	SET_UID(mi, 0x36375a1f, 0xc142, 0x4d6e, 0xa6, 0x57, 0xe4, 0x76, 0x5d, 0xbc, 0x59, 0x8e);
	ContactMenuItems[CMI_AUTH_REQUEST] = Menu_AddContactMenuItem(&mi);
	CreateServiceFunction(mi.pszService, GlobalService<&CSkypeProto::OnRequestAuth>);

	// Grant authorization
	mi.pszService = MODULE"/GrantAuth";
	mi.name.t = LPGENT("Grant authorization");
	mi.position = CMI_POSITION + CMI_AUTH_GRANT;
	mi.hIcolibItem = ::Skin_GetIconHandle(SKINICON_AUTH_GRANT);
	SET_UID(mi, 0x4c90452a, 0x869a, 0x4a81, 0xaf, 0xa8, 0x28, 0x34, 0xaf, 0x2b, 0x6b, 0x30);
	ContactMenuItems[CMI_AUTH_GRANT] = Menu_AddContactMenuItem(&mi);
	CreateServiceFunction(mi.pszService, GlobalService<&CSkypeProto::OnGrantAuth>);

	mi.pszService = MODULE"/GetHistory";
	mi.name.t = LPGENT("Get server history");
	mi.position = CMI_POSITION + CMI_GETSERVERHISTORY;
	mi.hIcolibItem = GetIconHandle(IDI_SYNCHISTORY);
	SET_UID(mi, 0xc9a64e98, 0x9257, 0x4b52, 0x98, 0xdd, 0x7f, 0x56, 0xb3, 0x90, 0xe3, 0xde);
	ContactMenuItems[CMI_GETSERVERHISTORY] = Menu_AddContactMenuItem(&mi);
	CreateServiceFunction(mi.pszService, GlobalService<&CSkypeProto::GetContactHistory>);

	mi.pszService = MODULE"/BlockContact";
	mi.name.t = LPGENT("Block contact");
	mi.position = CMI_POSITION + CMI_BLOCK;
	mi.hIcolibItem = GetIconHandle(IDI_BLOCKUSER);
	SET_UID(mi ,0xc6169b8f, 0x53ab, 0x4242, 0xbe, 0x90, 0xe2, 0x4a, 0xa5, 0x73, 0x88, 0x32);
	ContactMenuItems[CMI_BLOCK] = Menu_AddContactMenuItem(&mi);
	CreateServiceFunction(mi.pszService, GlobalService<&CSkypeProto::BlockContact>);

	mi.pszService = MODULE"/UnblockContact";
	mi.name.t = LPGENT("Unblock contact");
	mi.position = CMI_POSITION + CMI_UNBLOCK;
	mi.hIcolibItem = GetIconHandle(IDI_UNBLOCKUSER);
	SET_UID(mi, 0x88542f43, 0x7448, 0x48d0, 0x81, 0xa3, 0x26, 0x0, 0x4f, 0x37, 0xee, 0xe0);
	ContactMenuItems[CMI_UNBLOCK] = Menu_AddContactMenuItem(&mi);
	CreateServiceFunction(mi.pszService, GlobalService<&CSkypeProto::UnblockContact>);
}
开发者ID:kxepal,项目名称:miranda-ng,代码行数:51,代码来源:skype_menus.cpp


示例12: add_contextmenu

HANDLE add_contextmenu(MCONTACT) {
	CLISTMENUITEM mi = CallItem();
	hMenuCallItem = Menu_AddContactMenuItem(&mi);

	mi = HupItem();
	hMenuCallHangup = Menu_AddContactMenuItem(&mi);

	mi = SkypeOutCallItem();
	hMenuSkypeOutCallItem = Menu_AddContactMenuItem(&mi);

	mi = HoldCallItem();
	hMenuHoldCallItem = Menu_AddContactMenuItem(&mi);

	// We cannot use flag PF1_FILESEND for sending files, as Skype opens its own
	// sendfile-Dialog.
	mi = FileTransferItem();
	hMenuFileTransferItem = Menu_AddContactMenuItem(&mi);

	mi = ChatInitItem();
	hMenuChatInitItem = Menu_AddContactMenuItem(&mi);

	mi = BlockContactItem();
	hMenuBlockContactItem = Menu_AddContactMenuItem(&mi);

	memset(&mi, 0, sizeof(mi));
	mi.cbSize = sizeof(mi);
	mi.position = -2000005000;
	mi.flags = CMIF_TCHAR;
	mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_IMPORT));
	mi.pszContactOwner = SKYPE_PROTONAME;
	mi.ptszName = LPGENT("Import Skype history");
	mi.pszService = SKYPE_IMPORTHISTORY;
	return Menu_AddContactMenuItem(&mi);
}
开发者ID:martok,项目名称:miranda-ng,代码行数:34,代码来源:contacts.cpp


示例13: __declspec

extern "C" int __declspec(dllexport) Load(void)
{
	mir_getLP(&pluginInfo);

	GetModuleFileName(hInst, tszPath, _countof(tszPath));
	*(_tcsrchr(tszPath, _T('\\')) + 1) = _T('\0');

	/*initialize miranda hooks and services on options dialog*/
	HookEvent(ME_OPT_INITIALISE, MessageOptInit);
	/*initialize miranda hooks and services*/
	HookEvent(ME_DB_EVENT_ADDED, MessageEventAdded);
	HookEvent(ME_CLIST_PREBUILDCONTACTMENU, MessagePrebuild);

	CreateServiceFunction(SERV_CONTACT_AUTO_CHAT, ContactClickAutoChat);
	CreateServiceFunction(SERV_CONTACT_NOT_TO_CHAT, ContactClickNotToChat);
	CreateServiceFunction(SERV_CONTACT_START_CHATTING, ContactClickStartChatting);
	{
		CMenuItem mi;

		SET_UID(mi, 0xea31f628, 0x1445, 0x4b62, 0x98, 0x19, 0xce, 0x15, 0x81, 0x49, 0xa, 0xbd);
		mi.position = -50010002; //TODO: check the warning
		mi.name.a = BOLTUN_AUTO_CHAT;
		mi.pszService = SERV_CONTACT_AUTO_CHAT;
		hMenuItemAutoChat = Menu_AddContactMenuItem(&mi);

		SET_UID(mi, 0x726af984, 0x988c, 0x4d5d, 0x97, 0x30, 0xdc, 0x46, 0x55, 0x76, 0x1, 0x73);
		mi.position = -50010001; //TODO: check the warning
		mi.name.a = BOLTUN_NOT_TO_CHAT;
		mi.pszService = SERV_CONTACT_NOT_TO_CHAT;
		hMenuItemNotToChat = Menu_AddContactMenuItem(&mi);

		SET_UID(mi, 0x9e0117f3, 0xb7df, 0x4f1b, 0xae, 0xec, 0xc4, 0x72, 0x59, 0x72, 0xc8, 0x58);
		mi.flags = CMIF_NOTOFFLINE;
		mi.position = -50010000; //TODO: check the warning
		mi.hIcolibItem = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_RECVMSG));
		mi.name.a = BOLTUN_START_CHATTING;
		mi.pszService = SERV_CONTACT_START_CHATTING;
		hMenuItemStartChatting = Menu_AddContactMenuItem(&mi);
	}

	int line;
	blInit = LoadMind(Config.MindFileName, line);
	if (!blInit) {
		TCHAR path[2000];
		mir_sntprintf(path, TranslateTS(FAILED_TO_LOAD_BASE), line, (const TCHAR*)Config.MindFileName);
		MessageBox(NULL, path, TranslateTS(BOLTUN_ERROR), MB_ICONERROR | MB_TASKMODAL | MB_OK);
	}
	return 0;
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:49,代码来源:boltun.cpp


示例14: __declspec

extern "C" int __declspec(dllexport) Load(void)
{
	mir_getLP(&pluginInfo);
	INITCOMMONCONTROLSEX icex;

	icex.dwSize = sizeof(icex);
	icex.dwICC = ICC_DATE_CLASSES;

	InitCommonControlsEx(&icex);

	if ((hUxTheme = LoadLibraryA("uxtheme.dll")) != 0)
		MyEnableThemeDialogTexture = (BOOL(WINAPI *)(HANDLE, DWORD))GetProcAddress(hUxTheme, "EnableThemeDialogTexture");

	/// all initialization here
	hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_HISTORYICON));
	hOpenWindowsList = WindowList_Create();

	InitServices();

	/// menu items
	CMenuItem mi;
	mi.name.t = LPGENT("View &history");
	mi.flags = CMIF_TCHAR;
	mi.position = 1000090000;
	mi.hIcolibItem = hIcon;
	mi.pszService = MS_HISTORY_SHOWCONTACTHISTORY;
	Menu_AddContactMenuItem(&mi);

	/// @todo (White-Tiger#1#08/19/14): fully implement System History someday^^
	mi.name.t = LPGENT("&System History");
	Menu_AddMainMenuItem(&mi);

	HookEvents();
	return 0;
}
开发者ID:kmdtukl,项目名称:miranda-ng,代码行数:35,代码来源:IEHistory.cpp


示例15: ModulesLoaded

static int ModulesLoaded(WPARAM, LPARAM)
{
    CMenuItem mi;
    SET_UID(mi, 0x5ba238de, 0xe16b, 0x4928, 0xa0, 0x70, 0xff, 0x43, 0xf6, 0x1f, 0x16, 0xd4);
    mi.position = 2000070050;
    mi.hIcolibItem = icon.hIcolib;
    mi.name.a = LPGEN("Assign smiley category");
    hContactMenuItem = Menu_AddContactMenuItem(&mi);

    DownloadInit();

    //install hooks if enabled
    InstallDialogBoxHook();

    g_SmileyCategories.AddAllProtocolsAsCategory();
    g_SmileyCategories.ClearAndLoadAll();

    ColourID cid = { sizeof(cid) };
    strcpy_s(cid.dbSettingsGroup, "SmileyAdd");
    strcpy_s(cid.group, LPGEN("SmileyAdd"));
    strcpy_s(cid.name, LPGEN("Background color"));
    strcpy_s(cid.setting, "SelWndBkgClr");
    cid.defcolour = GetSysColor(COLOR_WINDOW);
    ColourRegister(&cid);
    return 0;
}
开发者ID:kxepal,项目名称:miranda-ng,代码行数:26,代码来源:main.cpp


示例16: __declspec

extern "C" int __declspec(dllexport)Load(void)
{
	mir_getLP(&pluginInfoEx);
	mir_getCLI();

	CreateServiceFunction(protocolname"/ToggleEnable", ToggleEnable);
	CreateServiceFunction(protocolname"/ToggleAutoanswer",Toggle);

	CMenuItem mi;
	mi.position = 500090000;
	mi.name.t = _T("");
	mi.pszService = protocolname"/ToggleEnable";
	hEnableMenu = Menu_AddMainMenuItem(&mi);

	mi.position = -0x7FFFFFFF;
	mi.name.t = _T("");
	mi.pszService = protocolname"/ToggleAutoanswer";
	hToggle = Menu_AddContactMenuItem(&mi);

	//add hook
	HookEvent(ME_OPT_INITIALISE, OptInit);
	HookEvent(ME_DB_EVENT_ADDED, addEvent);
	HookEvent(ME_SYSTEM_MODULESLOADED, CheckDefaults);

	Icon_RegisterT(hinstance, _T("Simple Auto Replier"), iconList, _countof(iconList));

	return 0;
}
开发者ID:kmdtukl,项目名称:miranda-ng,代码行数:28,代码来源:Main.cpp


示例17: OnModulesLoaded

static int OnModulesLoaded(WPARAM, LPARAM)
{
	ReloadGlobals();
	LoadGlobalIcons();
	LoadMsgLogIcons();
	ModuleLoad(0, 0);

	CMenuItem mi;
	SET_UID(mi, 0x58d8dc1, 0x1c25, 0x49c0, 0xb8, 0x7c, 0xa3, 0x22, 0x2b, 0x3d, 0xf1, 0xd8);
	mi.position = -2000090000;
	mi.flags = CMIF_DEFAULT;
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_EVENT_MESSAGE);
	mi.name.a = LPGEN("&Message");
	mi.pszService = MS_MSG_SENDMESSAGE;
	hMsgMenuItem = Menu_AddContactMenuItem(&mi);
	IcoLib_ReleaseIcon((HICON)mi.hIcolibItem);

	HookEvent(ME_SMILEYADD_OPTIONSCHANGED, SmileySettingsChanged);
	HookEvent(ME_IEVIEW_OPTIONSCHANGED, SmileySettingsChanged);
	HookEvent(ME_AV_AVATARCHANGED, AvatarChanged);
	HookEvent(ME_FONT_RELOAD, FontServiceFontsChanged);
	HookEvent(ME_MSG_ICONPRESSED, StatusIconPressed);
	HookEvent(ME_MC_DEFAULTTCHANGED, MetaContactChanged);

	RestoreUnreadMessageAlerts();
	OptionsInit();
	RegisterStatusIcons();
	return 0;
}
开发者ID:kxepal,项目名称:miranda-ng,代码行数:29,代码来源:msgs.cpp


示例18: LoadModules

int LoadModules(void)
{
	HookEvent(ME_OPT_INITIALISE,OptInitialise);
	HookEvent(ME_CLIST_PREBUILDCONTACTMENU,SmsRebuildContactMenu);
	HookEvent(ME_PROTO_ACK,handleAckSMS);
	HookEvent(ME_DB_EVENT_ADDED,handleNewMessage);
	HookEvent(ME_PROTO_ACCLISTCHANGED,RefreshAccountList);

	char szServiceFunction[MAX_PATH];
	mir_snprintf(szServiceFunction,sizeof(szServiceFunction),"%s%s",PROTOCOL_NAMEA,SMS_SEND);

	CLISTMENUITEM mi = { sizeof(mi) };
	mi.position = 300050000;
	mi.hIcon = LoadSkinnedIcon(SKINICON_OTHER_SMS);
	mi.ptszName = SMS_SEND_STR;
	mi.pszService = szServiceFunction;
	mi.flags = CMIF_TCHAR;
	Menu_AddMainMenuItem(&mi);

	mi.position = -2000070000;
	mi.hIcon = LoadSkinnedIcon(SKINICON_OTHER_SMS);
	mi.ptszName = SMS_SEND_CM_STR;
	mi.pszService = szServiceFunction;
	mi.flags = CMIF_TCHAR;	
	ssSMSSettings.hContactMenuItems[0] = Menu_AddContactMenuItem(&mi);

	SkinAddNewSoundEx("RecvSMSMsg",PROTOCOL_NAMEA,LPGEN("Incoming SMS Message"));
	SkinAddNewSoundEx("RecvSMSConfirmation",PROTOCOL_NAMEA,LPGEN("Incoming SMS Confirmation"));

	RefreshAccountList(NULL,NULL);

	RestoreUnreadMessageAlerts();
	return 0;
}
开发者ID:MrtsComputers,项目名称:miranda-ng,代码行数:34,代码来源:SMS_svc.cpp


示例19: __declspec

extern "C" int __declspec(dllexport)Load(void)
{
	mir_getLP(&pluginInfoEx);
	mir_getCLI();

	CreateServiceFunction(protocolname"/ToggleEnable", ToggleEnable);
	CreateServiceFunction(protocolname"/ToggleAutoanswer", Toggle);

	CMenuItem mi;

	SET_UID(mi, 0xac1c64a, 0x82ca, 0x4845, 0x86, 0x89, 0x59, 0x76, 0x12, 0x74, 0x72, 0x7b);
	mi.position = 500090000;
	mi.name.t = _T("");
	mi.pszService = protocolname"/ToggleEnable";
	hEnableMenu = Menu_AddMainMenuItem(&mi);

	SET_UID(mi, 0xb290cccd, 0x4ecc, 0x475e, 0x87, 0xcb, 0x51, 0xf4, 0x3b, 0xc3, 0x44, 0x9c);
	mi.position = -0x7FFFFFFF;
	mi.name.t = _T("");
	mi.pszService = protocolname"/ToggleAutoanswer";
	hToggle = Menu_AddContactMenuItem(&mi);

	//add hook
	HookEvent(ME_OPT_INITIALISE, OptInit);
	HookEvent(ME_DB_EVENT_ADDED, addEvent);
	HookEvent(ME_SYSTEM_MODULESLOADED, CheckDefaults);

	Icon_RegisterT(hinstance, _T("Simple Auto Replier"), iconList, _countof(iconList));

	return 0;
}
开发者ID:ybznek,项目名称:miranda-ng,代码行数:31,代码来源:Main.cpp


示例20: MainInit

int MainInit(WPARAM /*wparam*/, LPARAM /*lparam*/)
{
	Initialize();

	bReadMirandaDirAndPath();
	UpdateFileToColWidth();

	HookEvent(ME_DB_EVENT_ADDED, nExportEvent);
	HookEvent(ME_DB_CONTACT_DELETED, nContactDeleted);
	HookEvent(ME_OPT_INITIALISE, OptionsInitialize);

	if ( !bReplaceHistory)
	{
		CLISTMENUITEM mi = { sizeof(mi) };
		mi.flags = 0;
		mi.pszContactOwner = NULL;    //all contacts
		mi.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_EXPORT_MESSAGE));
		mi.position = 1000090100;
		mi.pszName = LPGEN("Open E&xported History");
		mi.pszService = MS_SHOW_EXPORT_HISTORY;
		hOpenHistoryMenuItem = Menu_AddContactMenuItem(&mi);

		if ( !hOpenHistoryMenuItem)
			MessageBox(NULL, TranslateT("Failed to add menu item Open Exported History\nCallService(MS_CLIST_ADDCONTACTMENUITEM,...)"), MSG_BOX_TITEL, MB_OK);
	}

	HookEvent(ME_SYSTEM_SHUTDOWN, nSystemShutdown);
	return 0;
}
开发者ID:MrtsComputers,项目名称:miranda-ng,代码行数:29,代码来源:main.cpp



注:本文中的Menu_AddContactMenuItem函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ Menu_AddItem函数代码示例发布时间:2022-05-30
下一篇:
C++ MenuBuilder函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap