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

C++ GetIconHandle函数代码示例

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

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



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

示例1: ToolbarModulesLoaded

static int ToolbarModulesLoaded(WPARAM, LPARAM)
{
	TTBButton ttb = { 0 };
	ttb.pszService = MS_CRASHDUMPER_STORETOCLIP;
	ttb.name = ttb.pszTooltipUp = LPGEN("Version Information To Clipboard");
	ttb.hIconHandleUp = GetIconHandle(IDI_VITOCLIP);
	ttb.dwFlags = TTBBF_VISIBLE;
	TopToolbar_AddButton(&ttb);

	ttb.pszService = MS_CRASHDUMPER_STORETOFILE;
	ttb.name = ttb.pszTooltipUp = LPGEN("Version Information To File");
	ttb.hIconHandleUp = GetIconHandle(IDI_VITOFILE);
	ttb.dwFlags = 0;
	TopToolbar_AddButton(&ttb);

	ttb.pszService = MS_CRASHDUMPER_VIEWINFO;
	ttb.name = ttb.pszTooltipUp = LPGEN("Show Version Information");
	ttb.hIconHandleUp = GetIconHandle(IDI_VISHOW);
	TopToolbar_AddButton(&ttb);

	ttb.pszService = MS_CRASHDUMPER_UPLOAD;
	ttb.name = ttb.pszTooltipUp = LPGEN("Upload Version Information");
	ttb.hIconHandleUp = GetIconHandle(IDI_VIUPLOAD);
	TopToolbar_AddButton(&ttb);
	return 0;
}
开发者ID:truefriend-cz,项目名称:miranda-ng,代码行数:26,代码来源:crshdmp.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: 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


示例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: Menu_GetProtocolRoot

void CAimProto::InitMainMenus(void)
{
	CMenuItem mi;
	mi.root = Menu_GetProtocolRoot(this);

	mi.pszService = "/ManageAccount";
	CreateProtoService(mi.pszService, &CAimProto::ManageAccount);
	mi.position = 201001;
	mi.hIcolibItem = GetIconHandle("aim");
	mi.name.a = LPGEN("Manage Account");
	hMainMenu[0] = Menu_AddProtoMenuItem(&mi, m_szModuleName);

	mi.pszService = "/InstantIdle";
	CreateProtoService(mi.pszService, &CAimProto::InstantIdle);
	mi.position = 201002;
	mi.hIcolibItem = GetIconHandle("idle");
	mi.name.a = LPGEN("Instant Idle");
	hMainMenu[1] = Menu_AddProtoMenuItem(&mi, m_szModuleName);

	mi.pszService = "/JoinChatRoom";
	CreateProtoService(mi.pszService, &CAimProto::JoinChatUI);
	mi.position = 201003;
	mi.hIcolibItem = GetIconHandle("aol");
	mi.name.a = LPGEN( "Join Chat Room" );
	hMainMenu[2] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
}
开发者ID:kmdtukl,项目名称:miranda-ng,代码行数:26,代码来源:theme.cpp


示例6: LoadNotifications

// interface
void LoadNotifications()
{
	POPUPNOTIFICATION notification = { 0 };
	notification.cbSize = sizeof(notification);
	notification.actionCount = 0;
	notification.lpActions = 0;

	mir_strncpy(notification.lpzGroup, "Misc", sizeof(notification.lpzName));
	mir_strncpy(notification.lpzName, "Warning", sizeof(notification.lpzName));
	notification.lchIcoLib = GetIconHandle(IDI_MB_WARN);
	notification.colorBack = RGB(210, 210, 150);
	notification.colorText = RGB(0, 0, 0);
	notification.iSeconds = 10;
	g_hntfWarning = RegisterNotification(&notification);

	mir_strncpy(notification.lpzGroup, "Misc", sizeof(notification.lpzName));
	mir_strncpy(notification.lpzName, "Notification", sizeof(notification.lpzName));
	notification.lchIcoLib = GetIconHandle(IDI_MB_INFO);
	notification.colorBack = RGB(230, 230, 230);
	notification.colorText = RGB(0, 0, 0);
	notification.iSeconds = 7;
	g_hntfNotification = RegisterNotification(&notification);

	mir_strncpy(notification.lpzGroup, "Misc", sizeof(notification.lpzName));
	mir_strncpy(notification.lpzName, "Error", sizeof(notification.lpzName));
	notification.lchIcoLib = GetIconHandle(IDI_MB_STOP);
	notification.colorBack = RGB(191, 0, 0);
	notification.colorText = RGB(255, 245, 225);
	notification.iSeconds = -1;
	g_hntfError = RegisterNotification(&notification);
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:32,代码来源:notifications.cpp


示例7: 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


示例8: MirOTRMenuCheckService

//true - ok,false ignore
INT_PTR MirOTRMenuCheckService(WPARAM wParam,LPARAM)
{
	PCheckProcParam pcpp = ( PCheckProcParam )wParam;
	lpMirOTRMenuExecParam cmep=NULL;
	TMO_MenuItem mi;

	if ( pcpp == NULL )
		return FALSE;

	cmep = ( lpMirOTRMenuExecParam )pcpp->MenuItemOwnerData;
	if ( cmep == NULL ) //this is rootsection...build it
		return TRUE;

	MCONTACT hContact = (MCONTACT)pcpp->wParam, hSub;
	if((hSub = db_mc_getMostOnline(hContact)) != 0)
		hContact = hSub;
	
	TrustLevel level = ( TrustLevel )otr_context_get_trust(otrl_context_find_miranda(otr_user_state, hContact));
	
	mi.cbSize = sizeof(mi);
	if ( CallService(MO_GETMENUITEM, (WPARAM)pcpp->MenuItemHandle, (LPARAM)&mi) == 0) {
		
		if ( mi.flags & CMIF_HIDDEN ) return FALSE;
		if ( mi.flags & CMIF_NOTPRIVATE  && level==TRUST_PRIVATE  ) return FALSE;
		if ( mi.flags & CMIF_NOTFINISHED && level==TRUST_FINISHED ) return FALSE;
		if ( mi.flags & CMIF_NOTUNVERIFIED  && level==TRUST_UNVERIFIED  ) return FALSE;
		if ( mi.flags & CMIF_NOTNOTPRIVATE && level==TRUST_NOT_PRIVATE ) return FALSE;
	
		if (pcpp->MenuItemHandle == hStatusInfoItem) {
			mi.flags = CMIM_NAME | CMIM_ICON | CMIF_TCHAR;
			switch (level) {
				case TRUST_PRIVATE:
					mi.hIcolibItem = GetIconHandle(ICON_PRIVATE);
					mi.ptszName = TranslateT(LANG_STATUS_PRIVATE);
					break;
				case TRUST_UNVERIFIED:
					mi.hIcolibItem = GetIconHandle(ICON_UNVERIFIED);
					mi.ptszName = TranslateT(LANG_STATUS_UNVERIFIED);
					break;
				case TRUST_FINISHED:
					mi.hIcolibItem = GetIconHandle(ICON_FINISHED);
					mi.ptszName = TranslateT(LANG_STATUS_FINISHED);
					break;
				default:
					mi.hIcolibItem = GetIconHandle(ICON_NOT_PRIVATE);
					mi.ptszName = TranslateT(LANG_STATUS_DISABLED);
			}
			CallService(MO_MODIFYMENUITEM, (WPARAM)hStatusInfoItem, (LPARAM)&mi);
		} else if (pcpp->MenuItemHandle == hHTMLConvMenuItem) {
			if (db_get_b(hContact, MODULENAME, "HTMLConv", 0) )
				mi.flags |= CMIM_FLAGS|CMIF_CHECKED;
			else
				mi.flags = CMIM_FLAGS|(mi.flags &~CMIF_CHECKED);
			CallService(MO_MODIFYMENUITEM, (WPARAM)hHTMLConvMenuItem, (LPARAM)&mi);
		}
	}
	return TRUE;
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:59,代码来源:mirotrmenu.cpp


示例9: UpdateMenu

void UpdateMenu()
{
	CLISTMENUITEM mi = {sizeof(mi)};
	mi.pszName = (Enabled == 1 ? DISABLE_SILENCE : ENABLE_SILENCE);
	mi.flags = CMIM_NAME | CMIM_ALL;
	mi.icolibItem = (Enabled == 1 ? GetIconHandle(DISABLE_SILENCE) : GetIconHandle(ENABLE_SILENCE));
	CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hSSMenuToggleOnOff, (LPARAM)&mi);
	UpdateTTB();
}
开发者ID:slotwin,项目名称:miranda-ng,代码行数:9,代码来源:main.cpp


示例10: UpdateMenu

void UpdateMenu(bool State)
{
	if (!State) // to enable auto-update
		Menu_ModifyItem(hService2[0], LPGENT("Auto Update Enabled"), GetIconHandle("enabled"));
	else  // to disable auto-update
		Menu_ModifyItem(hService2[0], LPGENT("Auto Update Disabled"), GetIconHandle("disabled"));

	CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTBButton, State ? TTBST_PUSHED : 0);
	db_set_b(NULL, MODULE, "AutoUpdate", !State);
}
开发者ID:kxepal,项目名称:miranda-ng,代码行数:10,代码来源:Services.cpp


示例11: sizeof

/**
 * Popup classes initialization
 */
void FacebookProto::InitPopups()
{		
	POPUPCLASS ppc = { sizeof(ppc) };
	ppc.flags = PCF_TCHAR;		
	ppc.PluginWindowProc = PopupDlgProc;
	ppc.lParam = APF_RETURN_HWND;

	TCHAR desc[256];
	char name[256];

	// Client
	mir_sntprintf(desc, SIZEOF(desc), _T("%s/%s"), m_tszUserName, TranslateT("Client notifications"));
	mir_snprintf(name, SIZEOF(name), "%s_%s", m_szModuleName, "Client");
	ppc.ptszDescription = desc;
	ppc.pszName = name;
	ppc.hIcon = Skin_GetIconByHandle(GetIconHandle("facebook"));
	ppc.colorBack = RGB(191, 0, 0); // red
	ppc.colorText = RGB(255, 255, 255); // white
	ppc.iSeconds = 0;
	popupClasses.push_back(Popup_RegisterClass(&ppc));

	// Newsfeeds
	mir_sntprintf(desc, SIZEOF(desc), _T("%s/%s"), m_tszUserName, TranslateT("News feeds"));
	mir_snprintf(name, SIZEOF(name), "%s_%s", m_szModuleName, "Newsfeed");
	ppc.ptszDescription = desc;
	ppc.pszName = name;
	ppc.hIcon = Skin_GetIconByHandle(GetIconHandle("newsfeed"));
	ppc.colorBack = RGB(255, 255, 255); // white
	ppc.colorText = RGB(0, 0, 0); // black
	ppc.iSeconds = 0;
	popupClasses.push_back(Popup_RegisterClass(&ppc));

	// Notifications
	mir_sntprintf(desc, SIZEOF(desc), _T("%s/%s"), m_tszUserName, TranslateT("Notifications"));
	mir_snprintf(name, SIZEOF(name), "%s_%s", m_szModuleName, "Notification");
	ppc.ptszDescription = desc;
	ppc.pszName = name;
	ppc.hIcon = Skin_GetIconByHandle(GetIconHandle("notification"));
	ppc.colorBack = RGB(59, 89, 152); // Facebook's blue
	ppc.colorText = RGB(255, 255, 255); // white
	ppc.iSeconds = 0;
	popupClasses.push_back(Popup_RegisterClass(&ppc));

	// Others
	mir_sntprintf(desc, SIZEOF(desc), _T("%s/%s"), m_tszUserName, TranslateT("Other events"));
	mir_snprintf(name, SIZEOF(name), "%s_%s", m_szModuleName, "Other");
	ppc.ptszDescription = desc;
	ppc.pszName = name;
	ppc.hIcon = Skin_GetIconByHandle(GetIconHandle("facebook"));
	ppc.colorBack = RGB(255, 255, 255); // white
	ppc.colorText = RGB(0, 0, 0); // black
	ppc.iSeconds = 0;
	popupClasses.push_back(Popup_RegisterClass(&ppc));
}
开发者ID:Ganster41,项目名称:miranda-ng,代码行数:57,代码来源:proto.cpp


示例12: EnableDisableMenuCommand

INT_PTR EnableDisableMenuCommand(WPARAM, LPARAM)
{
	db_set_b(0, MODULE, "TempDisable", opt.TempDisabled = !opt.TempDisabled);

	if (opt.TempDisabled)
		Menu_ModifyItem(hEnableDisableMenu, LPGENW("Enable status notification"), GetIconHandle(ICO_NOTIFICATION_OFF));
	else
		Menu_ModifyItem(hEnableDisableMenu, LPGENW("Disable status notification"), GetIconHandle(ICO_NOTIFICATION_ON));

	CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hToolbarButton, opt.TempDisabled ? 0 : TTBST_PUSHED);
	return 0;
}
开发者ID:tweimer,项目名称:miranda-ng,代码行数:12,代码来源:main.cpp


示例13: OnToolbarLoaded

int OnToolbarLoaded(WPARAM wParam, LPARAM lParam)
{
	TTBButton ttb = { sizeof(ttb) };
	ttb.name = LPGEN("Enable/disable auto update");
	ttb.pszService = MS_WEATHER_ENABLED;
	ttb.pszTooltipUp = LPGEN("Auto Update Enabled");
	ttb.pszTooltipDn = LPGEN("Auto Update Disabled");
	ttb.hIconHandleUp = GetIconHandle("main");
	ttb.hIconHandleDn = GetIconHandle("disabled");
	ttb.dwFlags = (db_get_b(NULL, WEATHERPROTONAME, "AutoUpdate", 1) ? 0 : TTBBF_PUSHED) | TTBBF_ASPUSHBUTTON | TTBBF_VISIBLE;
	hTBButton = TopToolbar_AddButton(&ttb);
	return 0;
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:13,代码来源:weather.cpp


示例14: OnToolbarLoaded

int OnToolbarLoaded(WPARAM, LPARAM)
{
	TTBButton ttb = { 0 };
	ttb.name = LPGEN("Enable/disable auto update");
	ttb.pszService = MS_NEWSAGGREGATOR_ENABLED;
	ttb.pszTooltipUp = LPGEN("Auto Update Enabled");
	ttb.pszTooltipDn = LPGEN("Auto Update Disabled");
	ttb.hIconHandleUp = GetIconHandle("enabled");
	ttb.hIconHandleDn = GetIconHandle("disabled");
	ttb.dwFlags = (db_get_b(NULL, MODULE, "AutoUpdate", 1) ? 0 : TTBBF_PUSHED) | TTBBF_ASPUSHBUTTON | TTBBF_VISIBLE;
	hTBButton = TopToolbar_AddButton(&ttb);
	return 0;
}
开发者ID:kxepal,项目名称:miranda-ng,代码行数:13,代码来源:Services.cpp


示例15: 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


示例16: CreateTTButtons

static int CreateTTButtons(WPARAM wParam, LPARAM lParam)
{
	TTBButton ttb = {sizeof(ttb)};
	ttb.dwFlags = (Enabled == 1 ? 0 : TTBBF_PUSHED) | TTBBF_VISIBLE | TTBBF_ASPUSHBUTTON;
	ttb.pszService = SS_SERVICE_NAME;
	ttb.hIconHandleDn = GetIconHandle(DISABLE_SILENCETTB);
	ttb.hIconHandleUp = GetIconHandle(ENABLE_SILENCETTB);
	ttb.name = TTBNAME;
	ttb.pszTooltipUp = SS_IS_ON;
	ttb.pszTooltipDn = SS_IS_OFF;
	Buttons = TopToolbar_AddButton(&ttb);
	if (Buttons)
		ttbButtons.insert(Buttons);
	return 0;
}
开发者ID:slotwin,项目名称:miranda-ng,代码行数:15,代码来源:main.cpp


示例17: strcpy

int FacebookProto::OnBuildStatusMenu(WPARAM wParam,LPARAM lParam)
{
	char text[200];
	strcpy(text,m_szModuleName);
	char *tDest = text+strlen(text);

	HGENMENU hRoot;
	CLISTMENUITEM mi = {sizeof(mi)};
	mi.pszService = text;

	hRoot = MO_GetProtoRootMenu(m_szModuleName);
	if (hRoot == NULL)
	{
		mi.popupPosition = 500085000;
		mi.hParentMenu = HGENMENU_ROOT;
		mi.flags = CMIF_ICONFROMICOLIB | CMIF_ROOTPOPUP | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED | ( this->isOnline() ? 0 : CMIF_GRAYED );
		mi.icolibItem = GetIconHandle( "facebook" );
		mi.ptszName = m_tszUserName;
		hRoot = m_hMenuRoot = reinterpret_cast<HGENMENU>( CallService(
			MS_CLIST_ADDPROTOMENUITEM,0,reinterpret_cast<LPARAM>(&mi)) );
	} else {
		if ( m_hMenuRoot )
			CallService( MS_CLIST_REMOVEMAINMENUITEM, ( WPARAM )m_hMenuRoot, 0 );
		m_hMenuRoot = NULL;
	}

	mi.flags = CMIF_ICONFROMICOLIB | CMIF_CHILDPOPUP | ( this->isOnline() ? 0 : CMIF_GRAYED );
	mi.position = 201001;

	CreateProtoService(m_szModuleName,"/Mind",&FacebookProto::OnMind,this);
	strcpy(tDest,"/Mind");
	mi.hParentMenu = hRoot;
	mi.pszName = LPGEN("Mind...");
	mi.icolibItem = GetIconHandle("mind");
	m_hStatusMind = reinterpret_cast<HGENMENU>( CallService(
		MS_CLIST_ADDPROTOMENUITEM,0,reinterpret_cast<LPARAM>(&mi)) );

	CreateProtoService(m_szModuleName,"/VisitProfile",&FacebookProto::VisitProfile,this);
	strcpy(tDest,"/VisitProfile");
	mi.flags = CMIF_ICONFROMICOLIB | CMIF_CHILDPOPUP;
	mi.pszName = LPGEN("Visit Profile");
	mi.icolibItem = GetIconHandle("homepage");
	// TODO RM: remember and properly free in destructor?
	/*m_hStatusMind = */reinterpret_cast<HGENMENU>( CallService(
		MS_CLIST_ADDPROTOMENUITEM,0,reinterpret_cast<LPARAM>(&mi)) );

	return 0;
}
开发者ID:TonyAlloa,项目名称:miranda-dev,代码行数:48,代码来源:proto.cpp


示例18: sizeof

void CVkProto::InitPopups(void)
{
	TCHAR desc[256];
	char name[256];
	POPUPCLASS ppc = { sizeof(ppc) };
	ppc.flags = PCF_TCHAR;

	mir_sntprintf(desc, _T("%s %s"), m_tszUserName, TranslateT("Errors"));
	mir_snprintf(name, "%s_%s", m_szModuleName, "Error");
	ppc.ptszDescription = desc;
	ppc.pszName = name;
	ppc.hIcon = Skin_LoadIcon(SKINICON_ERROR);
	ppc.colorBack = RGB(191, 0, 0); //Red
	ppc.colorText = RGB(255, 245, 225); //Yellow
	ppc.iSeconds = 60;
	m_hPopupClassError = Popup_RegisterClass(&ppc);

	mir_sntprintf(desc, _T("%s %s"), m_tszUserName, TranslateT("Notification"));
	mir_snprintf(name, "%s_%s", m_szModuleName, "Notification");
	ppc.ptszDescription = desc;
	ppc.pszName = name;
	ppc.hIcon = IcoLib_GetIconByHandle(GetIconHandle(IDI_NOTIFICATION));
	ppc.colorBack = RGB(190, 225, 255); //Blue
	ppc.colorText = RGB(255, 255, 255); //White
	ppc.iSeconds = 4;
	m_hPopupClassNotification = Popup_RegisterClass(&ppc);
}
开发者ID:truefriend-cz,项目名称:miranda-ng,代码行数:27,代码来源:vk_proto.cpp


示例19: ServicesModulesLoaded

int ServicesModulesLoaded(WPARAM wParam, LPARAM lParam) {
	// add main menu item

	CLISTMENUITEM menu = {0};

	menu.cbSize=sizeof(menu);
	menu.flags = CMIM_ALL | CMIF_ICONFROMICOLIB;
	menu.icolibItem = GetIconHandle(I_CHKUPD);

	menu.pszName = "Check for updates";
	menu.pszService= MS_UPDATE_CHECKFORUPDATES;
	menu.position = 500010000;

#ifdef MS_CLIST_ADDGROUPMENUITEM
	if (ServiceExists(MS_CLIST_ADDGROUPMENUITEM)) {
		GroupMenuParam gmp = {0};
		hGroupMenuItem = (HANDLE)CallService(MS_CLIST_ADDGROUPMENUITEM,(WPARAM)&gmp,(LPARAM)&menu);
	}
#endif
	hMainMenuItem = (HANDLE)CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&menu);

	hEventServicesModulesLoaded2 = HookEvent(ME_SYSTEM_MODULESLOADED, ServicesModulesLoaded2);
	startup_timer_id = SetTimer(0, 0, 5000, StartupTimerProc);

	return 0;
}
开发者ID:TonyAlloa,项目名称:miranda-dev,代码行数:26,代码来源:services.cpp


示例20: GetIcolibIcon

HICON GetIcolibIcon(int iconId) {
    HANDLE handle = GetIconHandle(iconId);
    if (handle != NULL) {
        return (HICON) CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)handle);
    }
    return NULL;
}
开发者ID:BackupTheBerlios,项目名称:mtlen-svn,代码行数:7,代码来源:tlen.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ GetIconInfo函数代码示例发布时间:2022-05-30
下一篇:
C++ GetIcon函数代码示例发布时间: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