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

C++ LoadSkinnedIcon函数代码示例

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

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



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

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


示例2: UpdateIcon

CSrmmProxyWindow::CSrmmProxyWindow(HANDLE hContact, HWND hwndWindow, HWND hwndParent)
{
	m_hContact = hContact;
	m_hwndWindow = hwndWindow;
	m_hwndParent = hwndParent;

	m_hbmpPreview = NULL;
	m_refreshPreview = true;

	m_bActive = false;
	m_bUnread = false;
	m_bTyping = false;

	UpdateIcon();
	SetWindowText(hwnd(), (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)m_hContact, GCDNF_TCHAR));
	SetTimer(1, 1000);

	SetEventHook(ME_DB_EVENT_ADDED, &CSrmmProxyWindow::OnDbEventAdded);
	SetEventHook(ME_DB_CONTACT_SETTINGCHANGED, &CSrmmProxyWindow::OnDbSettingChanged);
	SetEventHook(ME_AV_AVATARCHANGED, &CSrmmProxyWindow::OnAvatarChanged);
	SetEventHook(ME_PROTO_CONTACTISTYPING, &CSrmmProxyWindow::OnContactTyping);

	AddButton(LoadSkinnedIcon(SKINICON_OTHER_USERDETAILS), TranslateT("User Details"), 1, THBF_DISMISSONCLICK);
	AddButton(LoadSkinnedIcon(SKINICON_OTHER_HISTORY), TranslateT("History"), 2, THBF_DISMISSONCLICK);
	AddButton(LoadSkinnedIcon(SKINICON_EVENT_FILE), TranslateT("File"), 3, THBF_DISMISSONCLICK);
	UpdateButtons(g_pTaskbarList);
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:27,代码来源:srmmproxywindow.cpp


示例3: CreateImageList

void TSAPI CreateImageList(BOOL bInitial)
{
	int cxIcon = GetSystemMetrics(SM_CXSMICON);
	int cyIcon = GetSystemMetrics(SM_CYSMICON);

	/*
	 * the imagelist is now a fake. It is still needed to provide the tab control with a
	 * image list handle. This will make sure that the tab control will reserve space for
	 * an icon on each tab. This is a blank and empty icon
	 */

	if (bInitial) {
		PluginConfig.g_hImageList = ImageList_Create(16, 16, ILC_COLOR32 | ILC_MASK, 2, 0);
		HICON hIcon = CreateIcon(g_hInst, 16, 16, 1, 4, NULL, NULL);
		ImageList_AddIcon(PluginConfig.g_hImageList, hIcon);
		DestroyIcon(hIcon);
	}

	PluginConfig.g_IconFileEvent = LoadSkinnedIcon(SKINICON_EVENT_FILE);
	PluginConfig.g_IconMsgEvent = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
	PluginConfig.g_IconMsgEventBig = LoadSkinnedIconBig(SKINICON_EVENT_MESSAGE);
	if ((HICON)CALLSERVICE_NOTFOUND == PluginConfig.g_IconMsgEventBig)
		PluginConfig.g_IconMsgEventBig = 0;
	PluginConfig.g_IconTypingEventBig = LoadSkinnedIconBig(SKINICON_OTHER_TYPING);
	if ((HICON)CALLSERVICE_NOTFOUND == PluginConfig.g_IconTypingEventBig)
		PluginConfig.g_IconTypingEventBig = 0;
	PluginConfig.g_IconSend = PluginConfig.g_buttonBarIcons[9];
	PluginConfig.g_IconTypingEvent = PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING];
}
开发者ID:slotwin,项目名称:miranda-ng,代码行数:29,代码来源:msgs.cpp


示例4: CListIconsChanged

int CListIconsChanged(WPARAM wParam,LPARAM lParam)
{
	int i,j;

	for(i=0;i<sizeof(statusModeList)/sizeof(statusModeList[0]);i++)
		ImageList_ReplaceIcon(hCListImages,i+1,LoadSkinnedIcon(skinIconStatusList[i]));
	ImageList_ReplaceIcon(hCListImages,IMAGE_GROUPOPEN, LoadSkinnedIcon(SKINICON_OTHER_GROUPOPEN));
	ImageList_ReplaceIcon(hCListImages,IMAGE_GROUPSHUT, LoadSkinnedIcon(SKINICON_OTHER_GROUPSHUT));
	for(i=0;i<protoIconIndexCount;i++)
		for(j=0;j<sizeof(statusModeList)/sizeof(statusModeList[0]);j++)
			ImageList_ReplaceIcon(hCListImages,protoIconIndex[i].iIconBase+j,LoadSkinnedProtoIcon(protoIconIndex[i].szProto,statusModeList[j]));
	TrayIconIconsChanged();
	InvalidateRectZ((HWND)CallService(MS_CLUI_GETHWND,0,0),NULL,TRUE);
	return 0;
}
开发者ID:BackupTheBerlios,项目名称:modernb-svn,代码行数:15,代码来源:clistmod.c


示例5: ShowPopupPreview

int ShowPopupPreview(HWND optDlg, BYTE popupType, TCHAR *line1, TCHAR *line2)
{
	POPUPDATAT ppdp = {0};
	switch (popupType)
	{
		case POPUP_DEFAULT:
			ppdp.colorText = SendDlgItemMessage(optDlg,IDC_OPT_POPUPS_APPROVED_FOREGROUND,CPM_GETCOLOUR,0,0);
			ppdp.colorBack = SendDlgItemMessage(optDlg,IDC_OPT_POPUPS_APPROVED_BACKGROUND,CPM_GETCOLOUR,0,0);
			break;
		case POPUP_BLOCKED:
			ppdp.colorText = SendDlgItemMessage(optDlg,IDC_OPT_POPUPS_BLOCKED_FOREGROUND,CPM_GETCOLOUR,0,0);
			ppdp.colorBack = SendDlgItemMessage(optDlg,IDC_OPT_POPUPS_BLOCKED_BACKGROUND,CPM_GETCOLOUR,0,0);
			ppdp.iSeconds = GetDlgItemInt(optDlg, IDC_OPT_POPUPS_BLOCKED_TIMEOUT, NULL, TRUE);
			ppdp.lchIcon = LoadSkinnedIcon(SKINICON_OTHER_DELETE);
			break;
		case POPUP_APPROVED:
			ppdp.colorText = SendDlgItemMessage(optDlg,IDC_OPT_POPUPS_APPROVED_FOREGROUND,CPM_GETCOLOUR,0,0);
			ppdp.colorBack = SendDlgItemMessage(optDlg,IDC_OPT_POPUPS_APPROVED_BACKGROUND,CPM_GETCOLOUR,0,0);
			ppdp.iSeconds = GetDlgItemInt(optDlg, IDC_OPT_POPUPS_APPROVED_TIMEOUT, NULL, TRUE);
			ppdp.lchIcon = LoadSkinnedIcon(SKINICON_OTHER_ADDCONTACT);
			break;
		case POPUP_CHALLENGE:
			ppdp.colorText = SendDlgItemMessage(optDlg,IDC_OPT_POPUPS_CHALLENGE_FOREGROUND,CPM_GETCOLOUR,0,0);
			ppdp.colorBack = SendDlgItemMessage(optDlg,IDC_OPT_POPUPS_CHALLENGE_BACKGROUND,CPM_GETCOLOUR,0,0);
			ppdp.iSeconds = GetDlgItemInt(optDlg, IDC_OPT_POPUPS_CHALLENGE_TIMEOUT, NULL, TRUE);
			ppdp.lchIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
			break;
	}
	if (SendDlgItemMessage(optDlg, IDC_OPT_POPUPS_WINDOWS_COLORS, BM_GETCHECK, 0, 0)) {
		ppdp.colorText = GetSysColor(COLOR_WINDOWTEXT);
		ppdp.colorBack = GetSysColor(COLOR_WINDOW);
	}
	if (SendDlgItemMessage(optDlg, IDC_OPT_POPUPS_DEFAULT_COLORS, BM_GETCHECK, 0, 0)) {
		ppdp.colorText = NULL;
		ppdp.colorBack = NULL;
	}
	if (ppdp.iSeconds < 1)
		ppdp.iSeconds = -1;
	if (SendDlgItemMessage(optDlg, IDC_OPT_POPUPS_DEFAULT_TIMEOUT, BM_GETCHECK, 0, 0) || popupType == POPUP_DEFAULT)
		ppdp.iSeconds = 0;

	ppdp.lchContact = NULL;	
	mir_sntprintf(ppdp.lptzContactName, MAX_CONTACTNAME, _T("%s"), (line1)?line1:_T(PLUGIN_NAME));
	if (line2)
		mir_sntprintf(ppdp.lptzText, MAX_SECONDLINE, _T("%s"), line2);
	return PUAddPopupT(&ppdp);

}
开发者ID:MrtsComputers,项目名称:miranda-ng,代码行数:48,代码来源:popups.cpp


示例6: MM_IconsChanged

void MM_IconsChanged(void)
{
	MODULEINFO *pTemp = m_ModList, *pLast = NULL;
	ImageList_ReplaceIcon(hIconsList, 0, LoadSkinnedIcon(SKINICON_EVENT_MESSAGE));
	ImageList_ReplaceIcon(hIconsList, 1, LoadIconEx( "overlay", FALSE ));
	while (pTemp != NULL)
	{
		pTemp->OnlineIconIndex = ImageList_ReplaceIcon(hIconsList, pTemp->OnlineIconIndex, LoadSkinnedProtoIcon(pTemp->pszModule, ID_STATUS_ONLINE));
		pTemp->OfflineIconIndex = ImageList_ReplaceIcon(hIconsList, pTemp->OfflineIconIndex, LoadSkinnedProtoIcon(pTemp->pszModule, ID_STATUS_OFFLINE));

		if (pTemp->hOfflineIcon)
			DestroyIcon(pTemp->hOfflineIcon);
		if (pTemp->hOnlineIcon)
			DestroyIcon(pTemp->hOnlineIcon);
		if (pTemp->hOnlineTalkIcon)
			DestroyIcon(pTemp->hOnlineTalkIcon);
		if (pTemp->hOfflineTalkIcon)
			DestroyIcon(pTemp->hOfflineTalkIcon);
		pTemp->hOfflineIcon = ImageList_GetIcon(hIconsList, pTemp->OfflineIconIndex, ILD_TRANSPARENT);
		pTemp->hOnlineIcon = ImageList_GetIcon(hIconsList, pTemp->OnlineIconIndex, ILD_TRANSPARENT);

		pTemp->hOnlineTalkIcon = ImageList_GetIcon(hIconsList, pTemp->OnlineIconIndex, ILD_TRANSPARENT|INDEXTOOVERLAYMASK(1));
		ImageList_ReplaceIcon(hIconsList, pTemp->OnlineIconIndex+1, pTemp->hOnlineTalkIcon);

		pTemp->hOfflineTalkIcon = ImageList_GetIcon(hIconsList, pTemp->OfflineIconIndex, ILD_TRANSPARENT|INDEXTOOVERLAYMASK(1));
		ImageList_ReplaceIcon(hIconsList, pTemp->OfflineIconIndex+1, pTemp->hOfflineTalkIcon);

		pLast = pTemp;
		pTemp = pTemp->next;
	}
	return;
}
开发者ID:dineshkummarc,项目名称:miranda-im-v0.9.47-src,代码行数:32,代码来源:manager.c


示例7: ShowPopup

// Show an popup
void ShowPopup(const char *title, const char *description, int type)
{
	if (!ServiceExists(MS_POPUP_ADDPOPUP) || !EnablePopups) 
		return;

	// Make popup
	POPUPDATA ppd = { 0 };
	ppd.lchIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);

	strncpy(ppd.lpzContactName, title == NULL ? "Modern Contact List" : title, SIZEOF(ppd.lpzContactName)-1);
	ppd.lpzContactName[SIZEOF(ppd.lpzContactName)-1] = '\0';

	if (description != NULL) {
		strncpy(ppd.lpzText, description, SIZEOF(ppd.lpzText)-1);
		ppd.lpzText[SIZEOF(ppd.lpzText)-1] = '\0';
	}

	if (type != POPUP_TYPE_NORMAL && type != POPUP_TYPE_TEST) {
		ppd.colorBack = -1;
		ppd.colorText = RGB(255,255,255);
	}

	ppd.PluginWindowProc = DumbPopupDlgProc;
	PUAddPopup(&ppd);
}
开发者ID:MrtsComputers,项目名称:miranda-ng,代码行数:26,代码来源:modern_popup.cpp


示例8: LoadActions

// interface
void LoadActions()
{
	POPUPACTION actions[] =
	{
		{ sizeof(POPUPACTION), IcoLib_GetIcon(ICO_ACT_REPLY,0),		"General/Quick reply",			0},
		{ sizeof(POPUPACTION), IcoLib_GetIcon(ICO_ACT_MESS,0),		"General/Send message",			0},
		{ sizeof(POPUPACTION), IcoLib_GetIcon(ICO_ACT_INFO,0),		"General/User details",			0},
		{ sizeof(POPUPACTION), IcoLib_GetIcon(ICO_ACT_MENU,0),		"General/Contact menu",			0},
		{ sizeof(POPUPACTION), IcoLib_GetIcon(ICO_ACT_ADD,0),		"General/Add permanently",		0},
		{ sizeof(POPUPACTION), IcoLib_GetIcon(ICO_ACT_PIN,0),		"General/Pin popup",			0},
		{ sizeof(POPUPACTION), IcoLib_GetIcon(ICO_ACT_CLOSE,0),		"General/Dismiss popup",		0},
		{ sizeof(POPUPACTION), IcoLib_GetIcon(ICO_ACT_COPY,0),		"General/Copy to clipboard",	0},

//remove popup action
	#if defined(_DEBUG)
		{ sizeof(POPUPACTION), IcoLib_GetIcon(ICO_POPUP_ON,0),		"Popup Plus/Test action",			PAF_ENABLED},
		{ sizeof(POPUPACTION), IcoLib_GetIcon(ICO_ACT_CLOSE,0),		"Popup Plus/Second test action",	0},
		{ sizeof(POPUPACTION), LoadSkinnedIcon(SKINICON_OTHER_MIRANDA),		"Popup Plus/One more action",		PAF_ENABLED},
	#endif

	};

	for (int i = 0; i < SIZEOF(actions); ++i)
		RegisterAction(&actions[i]);
}
开发者ID:TonyAlloa,项目名称:miranda-dev,代码行数:26,代码来源:actions.cpp


示例9: CListModernOptInit

int CListModernOptInit(WPARAM wParam, LPARAM lParam)
{
	static int iBoldControls[] =
	{
		IDC_TXT_TITLE1, IDC_TXT_TITLE2,
		MODERNOPT_CTRL_LAST
	};

	MODERNOPTOBJECT obj = {0};

	obj.cbSize = sizeof(obj);
	obj.dwFlags = MODEROPT_FLG_TCHAR|MODEROPT_FLG_NORESIZE;
	obj.hIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
	obj.hInstance = g_hInst;
	obj.iSection = MODERNOPT_PAGE_CLIST;
	obj.iType = MODERNOPT_TYPE_SECTIONPAGE;
	obj.iBoldControls = iBoldControls;
	obj.lpzClassicGroup = "Contact List";
	obj.lpzClassicPage = "List";
	obj.lpzHelpUrl = "http://wiki.miranda-im.org/";

	obj.lpzTemplate = MAKEINTRESOURCEA(IDD_MODERNOPT_CLIST);
	obj.pfnDlgProc = DlgProcGenOpts;
	CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
	return 0;
}
开发者ID:TonyAlloa,项目名称:miranda-dev,代码行数:26,代码来源:clistopts.c


示例10: SplitmsgModulesLoaded

static int SplitmsgModulesLoaded(WPARAM wParam, LPARAM lParam)
{
	CLISTMENUITEM mi;
	PROTOCOLDESCRIPTOR **protocol;
	int protoCount, i;

	RegisterIcoLibIcons();
	RegisterFontServiceFonts();
	LoadGlobalIcons();
	LoadMsgLogIcons();
	LoadProtocolIcons();
	ZeroMemory(&mi, sizeof(mi));
	mi.cbSize = sizeof(mi);
	mi.position = -2000090000;
	mi.flags = 0;
	mi.hIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
	mi.pszName = Translate("&Message");
	mi.pszService = MS_MSG_SENDMESSAGE;
	CallService(MS_PROTO_ENUMPROTOCOLS, (WPARAM) & protoCount, (LPARAM) & protocol);
	for (i = 0; i < protoCount; i++) {
		if (protocol[i]->type != PROTOTYPE_PROTOCOL)
			continue;
		if (CallProtoService(protocol[i]->szName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND) {
			mi.pszContactOwner = protocol[i]->szName;
			hMsgMenuItem = realloc(hMsgMenuItem, (hMsgMenuItemCount + 1) * sizeof(HANDLE));
			hMsgMenuItem[hMsgMenuItemCount++] = (HANDLE) CallService(MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM) & mi);
		}
	}
	HookEvent(ME_CLIST_DOUBLECLICKED, SendMessageCommand);
	HookEvent(ME_SMILEYADD_OPTIONSCHANGED, SmileySettingsChanged);
	HookEvent(ME_IEVIEW_OPTIONSCHANGED, SmileySettingsChanged);
	RestoreUnreadMessageAlerts();
	return 0;
}
开发者ID:BackupTheBerlios,项目名称:mgoodies-svn,代码行数:34,代码来源:msgs.c


示例11: WindowSetIcon

void CJabberDlgBookmarks::OnInitDialog()
{
	CSuper::OnInitDialog();

	WindowSetIcon(m_hwnd, m_proto, "bookmarks");

	m_btnAdd.Disable();
	m_btnEdit.Disable();
	m_btnRemove.Disable();

	m_lvBookmarks.SetExtendedListViewStyle(LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES|LVS_EX_HEADERDRAGDROP | LVS_EX_DOUBLEBUFFER);

	HIMAGELIST hIml = m_lvBookmarks.CreateImageList(LVSIL_SMALL);
	ImageList_AddIcon_Icolib(hIml, m_proto->LoadIconEx("group"));
	ImageList_AddIcon_Icolib(hIml, LoadSkinnedIcon(SKINICON_EVENT_URL));

	m_lvBookmarks.AddColumn(0, TranslateT("Bookmark Name"),        m_proto->getWord("bookmarksWnd_cx0", 120));
	m_lvBookmarks.AddColumn(1, TranslateT("Address (JID or URL)"), m_proto->getWord("bookmarksWnd_cx1", 210));
	m_lvBookmarks.AddColumn(2, TranslateT("Nickname"),             m_proto->getWord("bookmarksWnd_cx2", 90));

	m_lvBookmarks.EnableGroupView(TRUE);
	m_lvBookmarks.AddGroup(0, TranslateT("Conferences"));
	m_lvBookmarks.AddGroup(1, TranslateT("Links"));

	Utils_RestoreWindowPosition(m_hwnd, NULL, m_proto->m_szModuleName, "bookmarksWnd_");
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:26,代码来源:jabber_bookmarks.cpp


示例12: _DebugPopup

int _DebugPopup(HANDLE hContact, const char *fmt, ...)
{
    POPUPDATA ppd;
    va_list va;
    char    debug[1024];
    int     ibsize = 1023;
    
    va_start(va, fmt);
    _vsnprintf(debug, ibsize, fmt, va);
    
    if(CallService(MS_POPUP_QUERY, PUQS_GETSTATUS, 0) == 1) {
        ZeroMemory((void *)&ppd, sizeof(ppd));
        ppd.lchContact = hContact;
        ppd.lchIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
        if(hContact != 0)
            strncpy(ppd.lpzContactName, (char*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,0), MAX_CONTACTNAME);
        else
            strncpy(ppd.lpzContactName, "Message", MAX_CONTACTNAME);
        strcpy(ppd.lpzText, "Debug (CListN+): ");
        strncat(ppd.lpzText, debug, MAX_SECONDLINE - 20);
        ppd.colorText = RGB(0,0,0);
        ppd.colorBack = RGB(255,0,255);
        CallService(MS_POPUP_ADDPOPUP, (WPARAM)&ppd, 0);
    }
    return 0;
}
开发者ID:BackupTheBerlios,项目名称:mimplugins-svn,代码行数:26,代码来源:init.c


示例13: ShowPopup

int ShowPopup(HANDLE hContact, BYTE popupType, TCHAR *line1, TCHAR *line2)
{
	POPUPDATAT ppdp = {0};
	switch (popupType)
	{
		case POPUP_DEFAULT:
			ppdp.colorText = _getOptD("PopupApprovedForeground", defaultPopupApprovedForeground);
			ppdp.colorBack = _getOptD("PopupApprovedBackground", defaultPopupApprovedBackground);
			break;
		case POPUP_BLOCKED:
			ppdp.colorText = _getOptD("PopupBlockedForeground", defaultPopupBlockedForeground);
			ppdp.colorBack = _getOptD("PopupBlockedBackground", defaultPopupBlockedBackground);
			ppdp.iSeconds = _getOptD("PopupBlockedTimeout", defaultPopupBlockedTimeout);
			ppdp.lchIcon = LoadSkinnedIcon(SKINICON_OTHER_DELETE);
			break;
		case POPUP_APPROVED:
			ppdp.colorText = _getOptD("PopupApprovedForeground", defaultPopupApprovedForeground);
			ppdp.colorBack = _getOptD("PopupApprovedBackground", defaultPopupApprovedBackground);
			ppdp.iSeconds = _getOptD("PopupApprovedTimeout", defaultPopupApprovedTimeout);
			ppdp.lchIcon = LoadSkinnedIcon(SKINICON_OTHER_ADDCONTACT);
			break;
		case POPUP_CHALLENGE:
			ppdp.colorText = _getOptD("PopupChallengeForeground", defaultPopupChallengeForeground);
			ppdp.colorBack = _getOptD("PopupChallengeBackground", defaultPopupChallengeBackground);
			ppdp.iSeconds = _getOptD("PopupChallengeTimeout", defaultPopupChallengeTimeout);
			ppdp.lchIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
			break;
	}
	if (_getOptB("PopupWindowsColors", defaultPopupWindowsColors)) {
		ppdp.colorText = GetSysColor(COLOR_WINDOWTEXT);
		ppdp.colorBack = GetSysColor(COLOR_WINDOW);
	}
	if (_getOptB("PopupDefaultColors", defaultPopupDefaultColors)) {
		ppdp.colorText = NULL;
		ppdp.colorBack = NULL;
	}
	if (ppdp.iSeconds < 1)
		ppdp.iSeconds = -1;
	if (_getOptB("PopupDefaultTimeout", defaultPopupDefaultTimeout) || popupType == POPUP_DEFAULT)
		ppdp.iSeconds = 0;

	ppdp.lchContact = hContact;	
	mir_sntprintf(ppdp.lptzContactName, MAX_CONTACTNAME, _T("%s"), (line1)?line1:_T(PLUGIN_NAME));
	if (line2)
		mir_sntprintf(ppdp.lptzText, MAX_SECONDLINE, _T("%s"), line2);
	return PUAddPopupT(&ppdp);
}
开发者ID:MrtsComputers,项目名称:miranda-ng,代码行数:47,代码来源:popups.cpp


示例14: InitOptions

void InitOptions()
{
	HookEvent(ME_OPT_INITIALISE, OptInit);

	// an icon for preview popups
	hPopupIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
	LoadOptions();
}
开发者ID:MrtsComputers,项目名称:miranda-ng,代码行数:8,代码来源:options.cpp


示例15: MessageEventAdded

static int MessageEventAdded(WPARAM wParam, LPARAM lParam)
{
	CLISTEVENT cle;
	DBEVENTINFO dbei;
	char *contactName;
	char toolTip[256];
	HWND hwnd;

	ZeroMemory(&dbei, sizeof(dbei));
	dbei.cbSize = sizeof(dbei);
	dbei.cbBlob = 0;
	CallService(MS_DB_EVENT_GET, lParam, (LPARAM) & dbei);
	hwnd = WindowList_Find(g_dat->hMessageWindowList, (HANDLE) wParam);
	if (hwnd) {
		SendMessage(hwnd, HM_DBEVENTADDED, wParam, lParam);
	}
	if (dbei.flags & DBEF_SENT || dbei.eventType != EVENTTYPE_MESSAGE)
		return 0;

	if (dbei.eventType == EVENTTYPE_MESSAGE && (dbei.flags & DBEF_READ))
		return 0;

	CallServiceSync(MS_CLIST_REMOVEEVENT, wParam, (LPARAM) 1);
	/* does a window for the contact exist? */
	if (hwnd) {
		return 0;
	}
	/* new message */
	SkinPlaySound("AlertMsg");
	if (DBGetContactSettingByte(NULL, SRMMMOD, SRMSGSET_AUTOPOPUP, SRMSGDEFSET_AUTOPOPUP)) {
		char *szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) wParam, 0);
		if (szProto && (g_dat->openFlags & SRMMStatusToPf2(CallProtoService(szProto, PS_GETSTATUS, 0, 0)))) {
			struct NewMessageWindowLParam newData = { 0 };
			newData.hContact = (HANDLE) wParam;
			if (g_dat->hParent == NULL || !(g_dat->flags & SMF_USETABS)) {
				g_dat->hParent = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_MSGWIN), NULL, DlgProcParentWindow, (LPARAM) & newData);
			}
			newData.flags = NMWLP_INCOMING;
			CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_MSG), g_dat->hParent, DlgProcMessage, (LPARAM) & newData);
			return 0;
		}
	}
	ZeroMemory(&cle, sizeof(cle));
	cle.cbSize = sizeof(cle);
	cle.hContact = (HANDLE) wParam;
	cle.hDbEvent = (HANDLE) lParam;
	cle.hIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
	cle.pszService = "SRMsg/ReadMessage";
	contactName = (char *) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, wParam, 0);
	mir_snprintf(toolTip, sizeof(toolTip), Translate("Message from %s"), contactName);
	cle.pszTooltip = toolTip;
	CallService(MS_CLIST_ADDEVENT, 0, (LPARAM) & cle);
	return 0;
}
开发者ID:BackupTheBerlios,项目名称:mgoodies-svn,代码行数:54,代码来源:msgs.c


示例16: PopupPreview

void PopupPreview()
{
	TCHAR *lptzTitle1Eng = TranslateT("The Jabberwocky");
	TCHAR *lptzText1Eng = TranslateT("`Twas brillig, and the slithy toves\r\nDid gyre and gimble in the wabe:\r\nAll mimsy were the borogoves,\r\nAnd the mome raths outgrabe.\r\n\t[b][i]Lewis Carroll, 1855[/i][/b]");

	TCHAR *lptzTitle2 = TranslateT("Test preview for the popup plugin settings. This is supposed to be long enough not to fit in one line...");
	TCHAR *lptzText2 = TranslateTS(
		LPGENT("This is a special test preview for the popup plugin settings. The text and title are quite long so you can tweak your skin and plugin settings to best fit your needs :)")
		);

	POPUPDATA2 ppd = { 0 };

	memset(&ppd, 0, sizeof(ppd));
	ppd.cbSize = sizeof(ppd);
	ppd.flags = PU2_TCHAR;

	ppd.lptzTitle = lptzTitle1Eng;
	ppd.lptzText = lptzText1Eng;
	ppd.lchIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
	CallService(MS_POPUP_ADDPOPUP2, (WPARAM)&ppd, APF_NO_HISTORY);
	if (PopupOptions.UseAnimations || PopupOptions.UseEffect) Sleep((ANIM_TIME * 2) / 3); // Pause

	memset(&ppd, 0, sizeof(ppd));
	ppd.cbSize = sizeof(ppd);
	ppd.flags = PU2_TCHAR;
	ppd.lptzTitle = lptzTitle2;
	ppd.lptzText = lptzText2;
	ppd.lchIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
	ppd.hbmAvatar = hbmNoAvatar;

	CallService(MS_POPUP_ADDPOPUP2, (WPARAM)&ppd, APF_NO_HISTORY);
	if (PopupOptions.UseAnimations || PopupOptions.UseEffect) Sleep((ANIM_TIME * 2) / 3); // Pause

	PUShowMessageT(TranslateT("This is a notification message"), (DWORD)SM_NOTIFY | 0x80000000);
	if (PopupOptions.UseAnimations || PopupOptions.UseEffect) Sleep((ANIM_TIME * 2) / 3); // Pause

	PUShowMessageT(TranslateT("This is a warning message"), (DWORD)SM_WARNING | 0x80000000);
	if (PopupOptions.UseAnimations || PopupOptions.UseEffect) Sleep((ANIM_TIME * 2) / 3); // Pause

	PUShowMessageT(TranslateT("This is an error message"), (DWORD)SM_ERROR | 0x80000000);
}
开发者ID:martok,项目名称:miranda-ng,代码行数:41,代码来源:config.cpp


示例17: LoadSkinnedIcon

void CSrmmProxyWindow::UpdateIcon()
{
	HICON hIcon;
	if (m_bTyping)
	{
		hIcon = LoadSkinnedIcon(SKINICON_OTHER_TYPING);
	} else
	if (m_bUnread)
	{
		hIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
	} else
	{
		char *szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)m_hContact, 0);
		if (!szProto) return;
		int iStatus = DBGetContactSettingWord(m_hContact, szProto, "Status", ID_STATUS_OFFLINE);
		hIcon = (HICON)LoadSkinnedProtoIcon(szProto, iStatus);
	}

	SendMessage(hwnd(), WM_SETICON, ICON_BIG, (LPARAM)hIcon);
	SendMessage(hwnd(), WM_SETICON, ICON_SMALL, (LPARAM)hIcon);
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:21,代码来源:srmmproxywindow.cpp


示例18: LoadSkinnedIcon

HICON EventList::GetEventCoreIcon(const EventIndex& ev)
{
	if (ev.isExternal)
		return NULL;
	
	HICON ico = (HICON)CallService(MS_DB_EVENT_GETICON, LR_SHARED, (LPARAM)&gdbei);
	HICON icoMsg = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
	if (icoMsg == ico)
		return NULL;

	return ico;
}
开发者ID:biddyweb,项目名称:miranda-ng,代码行数:12,代码来源:EventList.cpp


示例19: RestoreUnreadMessageAlerts

static void RestoreUnreadMessageAlerts(void)
{
	CLISTEVENT cle = { 0 };
	DBEVENTINFO dbei = { 0 };
	char toolTip[256];
	int windowAlreadyExists;
	HANDLE hDbEvent, hContact;
	int autoPopup = 0;

	dbei.cbSize = sizeof(dbei);
	cle.cbSize = sizeof(cle);
	cle.hIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
	cle.pszService = "SRMsg/ReadMessage";

	hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
	while (hContact) {
		hDbEvent = (HANDLE) CallService(MS_DB_EVENT_FINDFIRSTUNREAD, (WPARAM) hContact, 0);
		while (hDbEvent) {
			dbei.cbBlob = 0;
			CallService(MS_DB_EVENT_GET, (WPARAM) hDbEvent, (LPARAM) & dbei);
			if (!(dbei.flags & (DBEF_SENT | DBEF_READ)) && dbei.eventType == EVENTTYPE_MESSAGE) {
				windowAlreadyExists = WindowList_Find(g_dat->hMessageWindowList, hContact) != NULL;
				if (windowAlreadyExists)
					continue;

				if (DBGetContactSettingByte(NULL, SRMMMOD, SRMSGSET_AUTOPOPUP, SRMSGDEFSET_AUTOPOPUP)) {
					char *szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
					if (szProto && (g_dat->openFlags & SRMMStatusToPf2(CallProtoService(szProto, PS_GETSTATUS, 0, 0)))) {
						autoPopup = 1;
					}
				}
				if (autoPopup && !windowAlreadyExists) {
					HWND hwndParent;
					struct NewMessageWindowLParam newData = { 0 };
					newData.hContact = hContact;
					newData.flags = NMWLP_INCOMING;
					hwndParent = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_MSGWIN), NULL, DlgProcParentWindow, (LPARAM) & newData);
					CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_MSG), hwndParent, DlgProcMessage, (LPARAM) & newData);
//					CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_MSG), NULL, DlgProcMessage, (LPARAM) & newData);
				}
				else {
					cle.hContact = hContact;
					cle.hDbEvent = hDbEvent;
					mir_snprintf(toolTip, sizeof(toolTip), Translate("Message from %s"), (char *) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM) hContact, 0));
					cle.pszTooltip = toolTip;
					CallService(MS_CLIST_ADDEVENT, 0, (LPARAM) & cle);
				}
			}
			hDbEvent = (HANDLE) CallService(MS_DB_EVENT_FINDNEXT, (WPARAM) hDbEvent, 0);
		}
		hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0);
	}
}
开发者ID:BackupTheBerlios,项目名称:mgoodies-svn,代码行数:53,代码来源:msgs.c


示例20: LoadFromIconLib

static int TSAPI LoadFromIconLib()
{
	for (int n = 0; n < SIZEOF(ICONBLOCKS); n++)
		for (int i=0; i < ICONBLOCKS[n].nItems; i++)
			*(ICONBLOCKS[n].idesc[i].phIcon) = Skin_GetIcon(ICONBLOCKS[n].idesc[i].szName);

	PluginConfig.g_buttonBarIcons[0] = LoadSkinnedIcon(SKINICON_OTHER_ADDCONTACT);
	PluginConfig.g_buttonBarIcons[1] = LoadSkinnedIcon(SKINICON_OTHER_HISTORY);
	PluginConfig.g_buttonBarIconHandles[0] = LoadSkinnedIconHandle(SKINICON_OTHER_HISTORY);
	PluginConfig.g_buttonBarIconHandles[1] = LoadSkinnedIconHandle(SKINICON_OTHER_ADDCONTACT);
	PluginConfig.g_buttonBarIconHandles[20] = LoadSkinnedIconHandle(SKINICON_OTHER_USERDETAILS);

	PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING] = 
		PluginConfig.g_buttonBarIcons[12] = LoadSkinnedIcon(SKINICON_OTHER_TYPING);
	PluginConfig.g_IconChecked = LoadSkinnedIcon(SKINICON_OTHER_TICK);
	PluginConfig.g_IconUnchecked = LoadSkinnedIcon(SKINICON_OTHER_NOTICK);
	PluginConfig.g_IconFolder = LoadSkinnedIcon(SKINICON_OTHER_GROUPOPEN);

	PluginConfig.g_iconOverlayEnabled = Skin_GetIcon("tabSRMM_overlay_enabled");
	PluginConfig.g_iconOverlayDisabled = Skin_GetIcon("tabSRMM_overlay_disabled");

	PluginConfig.g_iconClock = Skin_GetIcon("tabSRMM_clock_symbol");

	CacheMsgLogIcons();
	M.BroadcastMessage(DM_LOADBUTTONBARICONS, 0, 0);
	return 0;
}
开发者ID:slotwin,项目名称:miranda-ng,代码行数:27,代码来源:msgs.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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