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

C++ LPGEN函数代码示例

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

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



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

示例1: InitGroupMenus

void InitGroupMenus(void)
{
	GroupMenuParam gmp = {};

	// Group menu
	CreateServiceFunction("CLISTMENUSGroup/ExecService", GroupMenuExecService);
	CreateServiceFunction("CLISTMENUSGroup/FreeOwnerDataGroupMenu", FreeOwnerDataGroupMenu);

	hEventPreBuildGroupMenu = CreateHookableEvent(ME_CLIST_PREBUILDGROUPMENU);
	HookEvent(ME_CLIST_PREBUILDGROUPMENU, OnBuildGroupMenu);

	hGroupMenuObject = Menu_AddObject("GroupMenu", LPGEN("Group menu"), 0, "CLISTMENUSGroup/ExecService");
	Menu_ConfigureObject(hGroupMenuObject, MCO_OPT_USERDEFINEDITEMS, TRUE);
	Menu_ConfigureObject(hGroupMenuObject, MCO_OPT_FREE_SERVICE, "CLISTMENUSGroup/FreeOwnerDataGroupMenu");
	Menu_ConfigureObject(hGroupMenuObject, MCO_OPT_ONADD_SERVICE, "CLISTMENUSGroup/GroupMenuOnAddService");
	{
		CMenuItem mi;

		SET_UID(mi, 0x2f75bc72, 0xd836, 0x4922, 0x9f, 0xe, 0xed, 0x9e, 0xe7, 0x2b, 0x84, 0xf0);
		mi.position = 100000;
		mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_GROUPADD);
		mi.pszService = "CLISTMENUSGroup/CreateGroupHelper";
		mi.name.a = LPGEN("&New group");
		Menu_AddGroupMenuItem(&mi);
		CreateServiceFunction(mi.pszService, CreateGroupHelper);

		SET_UID(mi, 0xe6269658, 0x69, 0x4094, 0x9b, 0x35, 0x4e, 0x80, 0x29, 0x26, 0xf, 0x8e);
		mi.position = 500001;
		mi.hIcolibItem = NULL;
		mi.pszService = MS_CLIST_SETHIDEOFFLINE;
		mi.name.a = LPGEN("&Hide offline users");
		gmp.wParam = -1;
		hHideOfflineUsersMenuItem = Menu_AddGroupMenuItem(&mi, &gmp);

		SET_UID(mi, 0xeded7371, 0xf6e6, 0x48c3, 0x8c, 0x9e, 0x62, 0xc1, 0xd5, 0xcb, 0x51, 0xbc);
		mi.position = 500002;
		mi.pszService = "CLISTMENUSGroup/HideOfflineRootHelper";
		mi.name.a = LPGEN("Hide &offline users out here");
		hHideOfflineUsersOutHereMenuItem = Menu_AddGroupMenuItem(&mi);
		CreateServiceFunction(mi.pszService, HideOfflineRootHelper);

		SET_UID(mi, 0x4c17b9cf, 0x513a, 0x41d8, 0x8d, 0x2b, 0x89, 0x44, 0x81, 0x14, 0x0, 0x91);
		mi.position = 500003;
		mi.pszService = "CLISTMENUSGroup/HideGroupsHelper";
		mi.name.a = LPGEN("Hide &empty groups");
		hHideEmptyGroupsMenuItem = Menu_AddGroupMenuItem(&mi);
		CreateServiceFunction(mi.pszService, HideGroupsHelper);

		SET_UID(mi, 0xfcbdbbb1, 0xa553, 0x49ac, 0xa5, 0xdf, 0xb4, 0x81, 0x38, 0xf, 0xa0, 0xc7);
		mi.position = 500004;
		mi.pszService = "CLISTMENUSGroup/UseGroupsHelper";
		mi.name.a = LPGEN("Disable &groups");
		hDisableGroupsMenuItem = Menu_AddGroupMenuItem(&mi);
		CreateServiceFunction(mi.pszService, UseGroupsHelper);

		SET_UID(mi, 0xfffb8733, 0xa3e4, 0x4566, 0xa6, 0x6e, 0x4c, 0x4c, 0x7c, 0xe9, 0x56, 0x99);
		mi.position = 1900000;
		mi.pszService = "CloseAction";
		mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_EXIT);
		mi.name.a = LPGEN("E&xit");
		Menu_AddGroupMenuItem(&mi);
	}

	// SubGroup menu
	CreateServiceFunction("CLISTMENUSSubGroup/ExecService", SubGroupMenuExecService);
	CreateServiceFunction("CLISTMENUSSubGroup/FreeOwnerDataSubGroupMenu", FreeOwnerDataSubGroupMenu);
	CreateServiceFunction("CLISTMENUSSubGroup/SubGroupMenuCheckService", SubGroupMenuCheckService);
	CreateServiceFunction("CLISTMENUSSubGroup/GroupMenuExecProxy", GroupMenuExecProxy);

	hEventPreBuildSubGroupMenu = CreateHookableEvent(ME_CLIST_PREBUILDSUBGROUPMENU);
	HookEvent(ME_CLIST_PREBUILDSUBGROUPMENU, OnBuildSubGroupMenu);

	hSubGroupMenuObject = Menu_AddObject("SubGroupMenu", LPGEN("Subgroup menu"), 0, "CLISTMENUSSubGroup/ExecService");
	Menu_ConfigureObject(hSubGroupMenuObject, MCO_OPT_USERDEFINEDITEMS, TRUE);
	Menu_ConfigureObject(hSubGroupMenuObject, MCO_OPT_FREE_SERVICE, "CLISTMENUSSubGroup/FreeOwnerDataSubGroupMenu");
	Menu_ConfigureObject(hSubGroupMenuObject, MCO_OPT_CHECK_SERVICE, "CLISTMENUSSubGroup/SubGroupMenuCheckService");
	{
		CMenuItem mi;

		SET_UID(mi, 0xd208f1d2, 0x7220, 0x4d37, 0xb6, 0xe4, 0xd5, 0x4a, 0xe8, 0xa3, 0xf4, 0x53);
		mi.position = 1000;
		mi.hIcolibItem = Skin_GetIconHandle(SKINICON_AUTH_ADD);
		mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
		mi.name.a = LPGEN("&New subgroup");
		gmp.wParam = POPUP_NEWSUBGROUP;
		Menu_AddSubGroupMenuItem(&mi, &gmp);

		SET_UID(mi, 0xd85f5ff0, 0x12ca, 0x464d, 0x86, 0x51, 0x53, 0x36, 0x9f, 0x1d, 0x80, 0x45);
		mi.position = 1001;
		mi.hIcolibItem = 0;
		mi.name.a = LPGEN("&Hide offline users in here");
		gmp.wParam = POPUP_GROUPHIDEOFFLINE;
		hHideOfflineUsersHereMenuItem = Menu_AddSubGroupMenuItem(&mi, &gmp);

		SET_UID(mi, 0xf0953dd, 0x5c31, 0x48a4, 0xb4, 0x16, 0x89, 0x5, 0x97, 0xd0, 0x75, 0x3e);
		mi.position = 900001;
		mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_RENAME);
		mi.name.a = LPGEN("&Rename group");
		gmp.wParam = POPUP_RENAMEGROUP;
		Menu_AddSubGroupMenuItem(&mi, &gmp);
//.........这里部分代码省略.........
开发者ID:Seldom,项目名称:miranda-ng,代码行数:101,代码来源:menu_groups.cpp


示例2: IconsInit

void IconsInit(void)
{
	Icon_Register(g_hInst, LPGEN("Simple Status Message"), iconList, SIZEOF(iconList), "SimpleStatusMsg");
}
开发者ID:MrtsComputers,项目名称:miranda-ng,代码行数:4,代码来源:utils.cpp


示例3: LPGEN

#include "common.h"

static IconItem iconList[] =
{
	// toolbar
	{ LPGEN("Popups are enabled"),          ICO_TB_POPUP_ON,    IDI_POPUP          },
	{ LPGEN("Popups are disabled"),         ICO_TB_POPUP_OFF,   IDI_NOPOPUP        },

	// common
	{ LPGEN("Popups are enabled"),          ICO_POPUP_ON,       IDI_POPUP          },
	{ LPGEN("Popups are disabled"),         ICO_POPUP_OFF,      IDI_NOPOPUP        },
	{ LPGEN("Popup History"),               ICO_HISTORY,        IDI_HISTORY        },
};

void InitIcons()
{
	Icon_Register(hInst, SECT_TOLBAR, iconList, 2);
	Icon_Register(hInst, SECT_POPUP,  iconList+2, 3);
}
开发者ID:kmdtukl,项目名称:miranda-ng,代码行数:19,代码来源:icons.cpp


示例4: LPGEN

#define INDEX_OFFLINE			5
#define INDEX_META				6
#define INDEX_GROUPS			7
#define INDEX_SOUNDS			8

static HWND hwndContactTree;

struct {
	char *name, *pszService;
	int iconidUp, iconidDn;
	char *tooltipUp, *tooltipDn;
	bool bCustomIcon, bDefVisible;
	HANDLE hButton;
}
static stdButtons[] = {
	{ LPGEN("Show main menu"),              TTBI_MAINMENUBUTT,           SKINICON_OTHER_MAINMENU, 0,               LPGEN("Show main menu"),        NULL, 0, 1 },
	{ LPGEN("Show options page"),           "Options/OptionsCommand",    SKINICON_OTHER_OPTIONS,  0,               LPGEN("Show options page"),     NULL, 0, 1 },
	{ LPGEN("Show accounts manager"),       "Protos/ShowAccountManager", SKINICON_OTHER_ACCMGR,   0,               LPGEN("Show accounts manager"), NULL, 0, 0 },
	{ LPGEN("Find/add contacts"),           MS_FINDADD_FINDADD,          SKINICON_OTHER_FINDUSER, 0,               LPGEN("Find/add contacts"),     NULL, 0, 1 },
	{ LPGEN("Show status menu"),            TTBI_STATUSMENUBUTT,         SKINICON_OTHER_STATUS,   0,               LPGEN("Show status menu"),      NULL, 0, 0 },
	{ LPGEN("Show/hide offline contacts"),  TTBI_SHOWHIDEOFFLINE,        IDI_HIDEOFFLINE,         IDI_SHOWOFFLINE, LPGEN("Hide offline contacts"), LPGEN("Show offline contacts"), 1, 1 },
	{ LPGEN("Enable/disable metacontacts"), "MetaContacts/OnOff",        IDI_METAOFF,             IDI_METAON,      LPGEN("Disable metacontacts"),  LPGEN("Enable metacontacts"), 1, 1 },
	{ LPGEN("Enable/disable groups"),       TTBI_GROUPSHOWHIDE,          IDI_GROUPSOFF,           IDI_GROUPSON,    LPGEN("Enable groups"),         LPGEN("Disable groups"), 1, 1 },
	{ LPGEN("Enable/disable sounds"),       TTBI_SOUNDSONOFF,            IDI_SOUNDSOFF,           IDI_SOUNDSON,    LPGEN("Disable sounds"),        LPGEN("Enable sounds"), 1, 1 },
	{ LPGEN("Minimize contact list"),       MS_CLIST_SHOWHIDE,           SKINICON_OTHER_SHOWHIDE, 0,               LPGEN("Minimize contact list"), NULL, 0, 1 },
	{ LPGEN("Exit"),                        "CloseAction",               SKINICON_OTHER_EXIT,     0,               LPGEN("Exit"),                  NULL, 0, 0 }
};

///////////////////////////////////////////////////////////////////////////////

int OnSettingChanging(WPARAM hContact, LPARAM lParam)
开发者ID:truefriend-cz,项目名称:miranda-ng,代码行数:31,代码来源:InternalButtons.cpp


示例5: LPGEN

    a) event notify stuff, messages posted from the popups to avoid threading
       issues.

    b) tray icon handling

    c) send later job management. Periodically process the queue of open
	   deferred send jobs.
 */

#include "commonheaders.h"

static UINT 	WM_TASKBARCREATED;
static HANDLE 	hSvcHotkeyProcessor = 0;

static HOTKEYDESC _hotkeydescs[] = {
	{ 0, "tabsrmm_mostrecent", LPGEN("Most recent unread session"), TABSRMM_HK_SECTION_IM, MS_TABMSG_HOTKEYPROCESS, HOTKEYCODE(HOTKEYF_CONTROL|HOTKEYF_SHIFT, 'R'), TABSRMM_HK_LASTUNREAD },
	{ 0, "tabsrmm_paste_and_send", LPGEN("Paste and send"), TABSRMM_HK_SECTION_GENERIC, 0, HOTKEYCODE(HOTKEYF_CONTROL|HOTKEYF_SHIFT, 'D'), TABSRMM_HK_PASTEANDSEND },
	{ 0, "tabsrmm_uprefs", LPGEN("Contact's messaging prefs"), TABSRMM_HK_SECTION_IM, 0, HOTKEYCODE(HOTKEYF_CONTROL|HOTKEYF_SHIFT, 'C'), TABSRMM_HK_SETUSERPREFS },
	{ 0, "tabsrmm_copts", LPGEN("Container options"), TABSRMM_HK_SECTION_GENERIC, 0, HOTKEYCODE(HOTKEYF_CONTROL, 'O'), TABSRMM_HK_CONTAINEROPTIONS },
	{ 0, "tabsrmm_nudge", LPGEN("Send nudge"), TABSRMM_HK_SECTION_IM, 0, HOTKEYCODE(HOTKEYF_CONTROL, 'N'), TABSRMM_HK_NUDGE },
	{ 0, "tabsrmm_sendfile", LPGEN("Send a file"), TABSRMM_HK_SECTION_IM, 0, HOTKEYCODE(HOTKEYF_ALT, 'F'), TABSRMM_HK_SENDFILE },
	{ 0, "tabsrmm_quote", LPGEN("Quote message"), TABSRMM_HK_SECTION_IM, 0, HOTKEYCODE(HOTKEYF_ALT, 'Q'), TABSRMM_HK_QUOTEMSG },
	{ 0, "tabsrmm_sendlater", LPGEN("Toggle send later"), TABSRMM_HK_SECTION_IM, 0, HOTKEYCODE(HOTKEYF_CONTROL|HOTKEYF_SHIFT, 'S'), TABSRMM_HK_TOGGLESENDLATER },

	{ 0, "tabsrmm_send", LPGEN("Send message"), TABSRMM_HK_SECTION_GENERIC, 0, 0, TABSRMM_HK_SEND },
	{ 0, "tabsrmm_emot", LPGEN("Smiley selector"), TABSRMM_HK_SECTION_GENERIC, 0, HOTKEYCODE(HOTKEYF_ALT, 'E'), TABSRMM_HK_EMOTICONS },
	{ 0, "tabsrmm_hist", LPGEN("Show message history"), TABSRMM_HK_SECTION_GENERIC, 0, HOTKEYCODE(HOTKEYF_ALT, 'H'), TABSRMM_HK_HISTORY },
	{ 0, "tabsrmm_umenu", LPGEN("Show user menu"), TABSRMM_HK_SECTION_IM, 0, HOTKEYCODE(HOTKEYF_ALT, 'D'), TABSRMM_HK_USERMENU },
	{ 0, "tabsrmm_udet", LPGEN("Show user details"), TABSRMM_HK_SECTION_IM, 0, HOTKEYCODE(HOTKEYF_ALT, 'U'), TABSRMM_HK_USERDETAILS },
	{ 0, "tabsrmm_tbar", LPGEN("Toggle toolbar"), TABSRMM_HK_SECTION_GENERIC, 0, HOTKEYCODE(HOTKEYF_ALT|HOTKEYF_SHIFT, 'T'), TABSRMM_HK_TOGGLETOOLBAR },
	{ 0, "tabsrmm_ipanel", LPGEN("Toggle info panel"), TABSRMM_HK_SECTION_GENERIC, 0, HOTKEYCODE(HOTKEYF_ALT|HOTKEYF_CONTROL, 'I'), TABSRMM_HK_TOGGLEINFOPANEL },
开发者ID:slotwin,项目名称:miranda-ng,代码行数:31,代码来源:hotkeyhandler.cpp


示例6: sizeof

PLUGININFOEX pluginInfo={
	sizeof(PLUGININFOEX),
	__PLUGIN_NAME,
	PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
	__DESCRIPTION,
	__AUTHOR,
	__AUTHOREMAIL,
	__COPYRIGHT,
	__AUTHORWEB,
	UNICODE_AWARE, 
	// {1AAC15E8-DCEC-4050-B66F-2AA0E6120C22}
	{0x1aac15e8, 0xdcec, 0x4050, {0xb6, 0x6f, 0x2a, 0xa0, 0xe6, 0x12, 0xc, 0x22}}
};

static IconItem icon = { LPGEN("Paste It"), "PasteIt_main", IDI_MENU };

XML_API xi = {0};
int hLangpack = 0;

BOOL APIENTRY DllMain(HMODULE hModule, DWORD  ul_reason_for_call, LPVOID lpReserved)
{
	hInst = hModule;
	return TRUE;
}

extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
{
	gMirandaVersion = mirandaVersion;
	return &pluginInfo;
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:30,代码来源:PasteIt.cpp


示例7: mir_sntprintf

		mir_sntprintf(cmdLine, SIZEOF(cmdLine), _T("\"%s\" /restart:%d /svc:dbchecker"), mirandaPath, GetCurrentProcessId());
		CallService("CloseAction", 0, 0);
		CreateProcess(mirandaPath, cmdLine, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
	}
	return 0;
}

static INT_PTR RestartMe(WPARAM wParam, LPARAM lParam)
{
	CallService(MS_SYSTEM_RESTART, 1, 0);
	return 0;
}

static IconItem iconList[] =
{
	{ LPGEN("Load profile"),   SRV_LOAD_PM,    IDI_LoadPM    },
	{ LPGEN("Change profile"), SRV_CHANGE_PM,  IDI_ChangePM  },
	{ LPGEN("Check database"), SRV_CHECK_DB,   IDI_Dbchecker },
	{ LPGEN("Restart"),        SRV_RESTART_ME, IDI_Restart   }
};

static int OnModulesLoaded(WPARAM, LPARAM)
{
	CLISTMENUITEM mi = { sizeof(mi) };
	mi.position = -500200000;
	mi.pszPopupName = LPGEN("Database");

	for (int i = 0; i < SIZEOF(iconList); i++) {
		mi.pszName = iconList[i].szDescr;
		mi.pszService = iconList[i].szName;
		mi.icolibItem = iconList[i].hIcolib;
开发者ID:0xmono,项目名称:miranda-ng,代码行数:31,代码来源:pmanagerEx.cpp


示例8: DllMain

extern "C" BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{	
	hInst = hinstDLL;
	return TRUE;
}

extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
{
	return &pluginInfoEx;
}

//------------ INIT FUNCTIONS ------------//

static IconItem iconList[] =
{
	{ LPGEN("FTP Server 1"),     "ftp1", 		IDI_FTP0       },
	{ LPGEN("FTP Server 2"),     "ftp2", 		IDI_FTP1       },
	{ LPGEN("FTP Server 3"),     "ftp3", 		IDI_FTP2       },
	{ LPGEN("FTP Server 4"),     "ftp4", 		IDI_FTP3       },
	{ LPGEN("FTP Server 5"),     "ftp5", 		IDI_FTP4       },
	{ LPGEN("Send file"),        "main",       IDI_MENU       },
	{ LPGEN("Clipboard"),        "clipboard",  IDI_CLIPBOARD  },
	{ LPGEN("Pause"),            "pause",      IDI_PAUSE      },
	{ LPGEN("Resume"),           "resume",     IDI_RESUME     },
	{ LPGEN("Delete from list"), "clear",      IDI_CLEAR      },
	{ LPGEN("Delete from FTP"),  "delete",     IDI_DELETE     }
};

static void InitIcolib()
{
	Icon_Register(hInst, LPGEN("FTP File"), iconList, SIZEOF(iconList), MODULE);
开发者ID:0xmono,项目名称:miranda-ng,代码行数:31,代码来源:ftpfile.cpp


示例9: InitIcolib

static void InitIcolib()
{
	Icon_Register(hInst, LPGEN("FTP File"), iconList, SIZEOF(iconList), MODULE);
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:4,代码来源:ftpfile.cpp


示例10: LoadIcons

// Load icons
void LoadIcons(void)
{
	Icon_Register(hInst, LPGEN("Nudge"), iconList, _countof(iconList));
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:5,代码来源:main.cpp


示例11: Proto_EnumAccounts

	DefaultNudge.Load();

	GlobalNudge.Load();

	int numberOfProtocols = 0;
	PROTOACCOUNT **ppProtocolDescriptors;
	Proto_EnumAccounts(&numberOfProtocols, &ppProtocolDescriptors);
	for (int i = 0; i < numberOfProtocols; i++)
		Nudge_AddAccount(ppProtocolDescriptors[i]);

	shake.Load();
}

static IconItem iconList[] =
{
	{ LPGEN("Nudge as Default"), "Nudge_Default", IDI_NUDGE }
};

// Load icons
void LoadIcons(void)
{
	Icon_Register(hInst, LPGEN("Nudge"), iconList, _countof(iconList));
}

// Nudge support
static int TabsrmmButtonPressed(WPARAM wParam, LPARAM lParam)
{
	CustomButtonClickData *cbcd = (CustomButtonClickData *)lParam;

	if (!mir_strcmp(cbcd->pszModule, "Nudge"))
		NudgeSend(wParam, 0);
开发者ID:Seldom,项目名称:miranda-ng,代码行数:31,代码来源:main.cpp


示例12: db_event_next

			// Get next event in chain
			hExistingDbEvent = db_event_next(hContact, hExistingDbEvent);
		}
	}
	// reset last event
	hPreviousContact = INVALID_CONTACT_ID;
	return FALSE;
}

/////////////////////////////////////////////////////////////////////////////////////////
// icons

static IconItem iconList[] =
{
	{ LPGEN("Import..."), "import_main", IDI_IMPORT }
};

HICON GetIcon(int iIconId, bool size)
{
	for (int i = 0; i < _countof(iconList); i++)
		if (iconList[i].defIconID == iIconId)
			return IcoLib_GetIconByHandle(iconList[i].hIcolib, size);

	return NULL;
}

HANDLE GetIconHandle(int iIconId)
{
	for (int i = 0; i < _countof(iconList); i++)
		if (iconList[i].defIconID == iIconId)
开发者ID:kxepal,项目名称:miranda-ng,代码行数:30,代码来源:utils.cpp


示例13: LPGENT

static HGENMENU hShowIfOflineItem = NULL;
static HANDLE hOnContactMenuBuild_FAV = NULL;

static TCHAR *FAVMENUROOTNAME = LPGENT("&Contact rate");

static TCHAR *rates[] = {
	LPGENT("None"),
	LPGENT("Low"),
	LPGENT("Medium"),
	LPGENT("High")
};

static IconItem iconList[] =
{
	{ LPGEN("Contact rate: none"), "Rate1", IDI_FAVORITE_0 },
	{ LPGEN("Contact rate: low"), "Rate2", IDI_FAVORITE_1 },
	{ LPGEN("Contact rate: medium"), "Rate3", IDI_FAVORITE_2 },
	{ LPGEN("Contact rate: high"), "Rate4", IDI_FAVORITE_3 }
};

static int FAV_OnContactMenuBuild(WPARAM hContact, LPARAM)
{
	BYTE bContactRate = db_get_b(hContact, "CList", "Rate", 0);
	if (bContactRate > SIZEOF(rates) - 1)
		bContactRate = SIZEOF(rates) - 1;

	BOOL bModifyMenu = FALSE;

	CLISTMENUITEM mi = { sizeof(mi) };
	mi.icolibItem = iconList[bContactRate].hIcolib;
开发者ID:biddyweb,项目名称:miranda-ng,代码行数:30,代码来源:modern_clistmenus.cpp


示例14: ButOrderOpts


//.........这里部分代码省略.........
					if (!(btn->dwFlags & TTBBF_OPTIONAL)) {
						// create button
						TTBButton ttb = { 0 };
						ttb.hIconDn = (HICON)LoadImage(hInst, MAKEINTRESOURCE(IDI_RUN), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);
						ttb.dwFlags = TTBBF_VISIBLE | TTBBF_ISLBUTTON | TTBBF_INTERNAL | TTBBF_OPTIONAL;
						ttb.name = NULL;
						ttb.program = NULL;
						int id = btn->id;
						btn = CreateButton(&ttb);
						btn->id = id;

						tvi.lParam = (LPARAM)btn;
						TreeView_SetItem(hTree, &tvi);
					}

					GetDlgItemText(hwndDlg, IDC_ENAME, buf, _countof(buf));
					replaceStr(btn->pszName, _T2A(buf));

					tvi.mask = TVIF_TEXT;
					tvi.pszText = buf;
					TreeView_SetItem(hTree, &tvi);

					GetDlgItemText(hwndDlg, IDC_EPATH, buf, _countof(buf));
					replaceStrT(btn->ptszProgram, buf);
				}
				break;
			}

			if (ctrlid == IDC_ADDLBUTTON) {
				// create button
				TTBButton ttb = { 0 };
				ttb.hIconDn = (HICON)LoadImage(hInst, MAKEINTRESOURCE(IDI_RUN), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);
				ttb.dwFlags = TTBBF_VISIBLE | TTBBF_ISLBUTTON | TTBBF_INTERNAL | TTBBF_OPTIONAL;
				ttb.name = LPGEN("Default");
				ttb.program = _T("Execute Path");
				TopButtonInt* b = CreateButton(&ttb);

				// get selection for insert
				TVITEM tvi = {0};
				tvi.hItem = TreeView_GetSelection(hTree);

				// insert item
				AddLine(hTree, b, tvi.hItem, dat->himlButtonIcons);

				SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
				break;
			}

			//----- Separators -----

			if (ctrlid == IDC_ADDSEP) {
				// create button
				TTBButton ttb = { 0 };
				ttb.dwFlags = TTBBF_VISIBLE | TTBBF_ISSEPARATOR | TTBBF_INTERNAL | TTBBF_OPTIONAL;
				TopButtonInt* b = CreateButton(&ttb);

				// get selection for insert
				TVITEM tvi = {0};
				tvi.hItem = TreeView_GetSelection(hTree);

				// insert item
				AddLine(hTree, b, tvi.hItem, dat->himlButtonIcons);

				SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
				break;
			}
开发者ID:kmdtukl,项目名称:miranda-ng,代码行数:67,代码来源:ttbopt.cpp


示例15: unpackWord


//.........这里部分代码省略.........

			if (dwUIN && wOldStatus == ID_STATUS_OFFLINE)
				debugLogA("Logged in with AIM client");
		}

		if (nIsICQ && wVersion < 8) {
			ClearContactCapabilities(hContact, CAPF_SRV_RELAY);
			if (wOldStatus == ID_STATUS_OFFLINE)
				debugLogA("Forcing simple messages due to compability issues");
		}

		// Process Avatar Hash
		pTLV = pChain->getTLV(0x1D, 1);
		if (pTLV)
			handleAvatarContactHash(dwUIN, szUID, hContact, pTLV->pData, pTLV->wLen);
		else
			handleAvatarContactHash(dwUIN, szUID, hContact, NULL, 0);

		// Process Status Note
		parseStatusNote(dwUIN, szUID, hContact, pChain);
	}
	// Free TLV chain
	disposeChain(&pChain);

	// Save contacts details in database
	if (hContact != NULL) {
		setDword(hContact, "LogonTS", dwOnlineSince);
		setDword(hContact, "AwayTS", dwAwaySince);
		setDword(hContact, "IdleTS", tIdleTS);

		if (dwMemberSince)
			setDword(hContact, "MemberTS", dwMemberSince);

		if (nIsICQ) {
			// on AIM these are not used
			setDword(hContact, "DirectCookie", dwDirectConnCookie);
			setByte(hContact, "DCType", (BYTE)nTCPFlag);
			setWord(hContact, "UserPort", (WORD)(dwPort & 0xffff));
			setWord(hContact, "Version", wVersion);
		}
		else {
			delSetting(hContact, "DirectCookie");
			delSetting(hContact, "DCType");
			delSetting(hContact, "UserPort");
			delSetting(hContact, "Version");
		}

		// if no detection, set uknown
		if (!szClient)
			szClient = (nIsICQ ? "Unknown" : "Unknown AIM");		

		if (szClient != (char*)-1) {
			db_set_utf(hContact, m_szModuleName, "MirVer", szClient);
			setByte(hContact, "ClientID", bClientId);
		}

		if (wOldStatus == ID_STATUS_OFFLINE) {
			setDword(hContact, "IP", dwIP);
			setDword(hContact, "RealIP", dwRealIP);
		}
		else {
			// if not first notification only write significant information
			if (dwIP)
				setDword(hContact, "IP", dwIP);
			if (dwRealIP)
				setDword(hContact, "RealIP", dwRealIP);
		}
		setWord(hContact,  "Status", (WORD)IcqStatusToMiranda(wStatus));

		// Update info?
		if (dwUIN) {
			// check if the local copy of user details is up-to-date
			if (IsMetaInfoChanged(hContact))
				icq_QueueUser(hContact);
		}
	}

	LPCTSTR ptszStatus = pcli->pfnGetStatusModeDescription(IcqStatusToMiranda(wStatus), 0);
	if (wOldStatus != IcqStatusToMiranda(wStatus)) {
		// And a small log notice... if status was changed
		if (nIsICQ)
			debugLogA("%u changed status to %S (v%d).", dwUIN, ptszStatus, wVersion);
		else
			debugLogA("%s changed status to %S.", strUID(dwUIN, szUID), ptszStatus);
	}

	if (szClient == cliSpamBot) {
		if (getByte("KillSpambots", DEFAULT_KILLSPAM_ENABLED) && db_get_b(hContact, "CList", "NotOnList", 0)) {
			// kill spammer
			icq_DequeueUser(dwUIN);
			icq_sendRemoveContact(dwUIN, NULL);
			AddToSpammerList(dwUIN);
			if (getByte("PopupsSpamEnabled", DEFAULT_SPAM_POPUPS_ENABLED))
				ShowPopupMsg(hContact, LPGEN("Spambot Detected"), LPGEN("Contact deleted & further events blocked."), POPTYPE_SPAM);
			CallService(MS_DB_CONTACT_DELETE, hContact, 0);

			debugLogA("Contact %u deleted", dwUIN);
		}
	}
}
开发者ID:martok,项目名称:miranda-ng,代码行数:101,代码来源:fam_03buddy.cpp


示例16: registerLogicTokens

void registerLogicTokens()
{
	registerIntToken(AND, parseAnd, TRF_UNPARSEDARGS | TRF_FUNCTION, LPGEN("Logical Expressions")"\t(x,y, ...)\t"LPGEN("performs logical AND (x && y && ...)"));
	registerIntToken(STR_FALSE, parseFalse, TRF_FIELD, LPGEN("Logical Expressions")"\t"LPGEN("Boolean FALSE"));
	registerIntToken(FOR, parseFor, TRF_UNPARSEDARGS | TRF_FUNCTION, LPGEN("Logical Expressions")"\t(w,x,y,z)\t"LPGEN("performs w, then shows z and performs y while x is TRUE"));
	registerIntToken(IF, parseIf, TRF_UNPARSEDARGS | TRF_FUNCTION, LPGEN("Logical Expressions")"\t(x,y,z)\t"LPGEN("shows y if x is TRUE, otherwise it shows z"));
	registerIntToken(IF2, parseIf2, TRF_UNPARSEDARGS | TRF_FUNCTION, LPGEN("Logical Expressions")"\t(x,y)\t"LPGEN("shows x if x is TRUE, otherwise it shows y (if(x,x,y))"));
	registerIntToken(IF3, parseIf3, TRF_UNPARSEDARGS | TRF_FUNCTION, LPGEN("Logical Expressions")"\t(x,y, ...)\t"LPGEN("the first argument parsed successfully"));
	registerIntToken(IFEQUAL, parseIfequal, TRF_UNPARSEDARGS | TRF_FUNCTION, LPGEN("Logical Expressions")"\t(w,x,y,z)\t"LPGEN("y if w = x, else z"));
	registerIntToken(IFGREATER, parseIfgreater, TRF_UNPARSEDARGS | TRF_FUNCTION, LPGEN("Logical Expressions")"\t(w,x,y,z)\t"LPGEN("y if w > x, else z"));
	registerIntToken(IFLONGER, parseIflonger, TRF_UNPARSEDARGS | TRF_FUNCTION, LPGEN("Logical Expressions")"\t(w,x,y,z)\t"LPGEN("y if string length of w > x, else z"));
	registerIntToken(EQUAL, parseEqual, TRF_FUNCTION, LPGEN("Logical Expressions")"\t(x,y)\t"LPGEN("TRUE if x = y"));
	registerIntToken(GREATER, parseGreater, TRF_FUNCTION, LPGEN("Logical Expressions")"\t(x,y)\t"LPGEN("TRUE if x > y"));
	registerIntToken(LONGER, parseLonger, TRF_FUNCTION, LPGEN("Logical Expressions")"\t(x,y)\t"LPGEN("TRUE if x is longer than y"));
	registerIntToken(NOT, parseNot, TRF_UNPARSEDARGS | TRF_FUNCTION, LPGEN("Logical Expressions")"\t(x)\t"LPGEN("performs logical NOT (!x)"));
	registerIntToken(OR, parseOr, TRF_UNPARSEDARGS | TRF_FUNCTION, LPGEN("Logical Expressions")"\t(x,y,...)\t"LPGEN("performs logical OR (x || y || ...)"));
	registerIntToken(STR_TRUE, parseTrue, TRF_FIELD, LPGEN("Logical Expressions")"\t"LPGEN("Boolean TRUE"));
	registerIntToken(XOR, parseXor, TRF_UNPARSEDARGS | TRF_FUNCTION, LPGEN("Logical Expressions")"\t(x,y)\t"LPGEN("performs logical XOR (x ^ y)"));
}
开发者ID:martok,项目名称:miranda-ng,代码行数:19,代码来源:parse_logic.cpp


示例17: LPGEN

//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
//
// -----------------------------------------------------------------------------
//  DESCRIPTION:
//
//  ChangeInfo Plugin stuff
//
// -----------------------------------------------------------------------------

#include "icqoscar.h"

static FieldNamesItem months[] = {
	{ 1, LPGEN("January") },
	{ 2, LPGEN("February") },
	{ 3, LPGEN("March") },
	{ 4, LPGEN("April") },
	{ 5, LPGEN("May") },
	{ 6, LPGEN("June") },
	{ 7, LPGEN("July") },
	{ 8, LPGEN("August") },
	{ 9, LPGEN("September") },
	{ 10, LPGEN("October") },
	{ 11, LPGEN("November") },
	{ 12, LPGEN("December") },
	{ 0, NULL }
};

const int ageRange[] = { 13, 0x7FFF };  // 14, 130
开发者ID:Ganster41,项目名称:miranda-ng,代码行数:31,代码来源:constants.cpp


示例18: SendDlgProc

INT_PTR CALLBACK SendDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
	TSendContactsData* wndData = (TSendContactsData*)GetWindowLongPtr(hwndDlg, DWLP_USER);

	switch (msg) {
	case WM_INITDIALOG:
		TranslateDialogDefault(hwndDlg);
		SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadIcon(hInst, MAKEINTRESOURCE(IDI_CONTACTS)));
		ResetListOptions(GetDlgItem(hwndDlg, IDC_LIST));
		SetAllContactChecks(GetDlgItem(hwndDlg, IDC_LIST), (HANDLE)lParam);
		WindowList_Add(ghSendWindowList, hwndDlg, (HANDLE)lParam);
		wndData = new TSendContactsData((HANDLE)lParam);
		SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG)wndData);
		// new dlg init 
		wndData->hIcons[0] = InitMButton(hwndDlg, IDC_ADD, MAKEINTRESOURCEA(IDI_ADDCONTACT), LPGEN("Add Contact Permanently to List"));
		wndData->hIcons[1] = InitMButton(hwndDlg, IDC_DETAILS, MAKEINTRESOURCEA(IDI_USERDETAILS), LPGEN("View User's Details"));
		wndData->hIcons[2] = InitMButton(hwndDlg, IDC_HISTORY, MAKEINTRESOURCEA(IDI_HISTORY), LPGEN("View User's History"));
		wndData->hIcons[3] = InitMButton(hwndDlg, IDC_USERMENU, MAKEINTRESOURCEA(IDI_DOWNARROW), LPGEN("User Menu"));

		SendMessage(hwndDlg, DM_UPDATETITLE, 0, 0);
		// new dialog init done
		return TRUE;

	case WM_SETFOCUS:
		SetFocus(GetDlgItem(hwndDlg, IDC_LIST));
		break;

	case WM_NOTIFY:
		if (((LPNMHDR)lParam)->idFrom == IDC_LIST) {
			switch (((LPNMHDR)lParam)->code) {
			case CLN_NEWCONTACT:
			case CLN_LISTREBUILT: // rebuild list
				if (wndData) SetAllContactChecks(GetDlgItem(hwndDlg, IDC_LIST), wndData->hContact);
			case CLN_OPTIONSCHANGED:
				ResetListOptions(GetDlgItem(hwndDlg, IDC_LIST));
				break;
			}
		}
		break;

	case WM_TIMER:
		if (wParam == TIMERID_MSGSEND) {
			KillTimer(hwndDlg, wParam);
			wndData->ShowErrorDlg(hwndDlg, "The contacts send timed out.", TRUE);
		}
		break;

	case DM_ERRORDECIDED:
		EnableWindow(hwndDlg, TRUE);
		wndData->hError = NULL;
		switch (wParam) {
		case MSGERROR_CANCEL:
			wndData->UnhookProtoAck();
			if (wndData->uacklist.Count) {
				for (int i = 0; i < wndData->uacklist.Count; i++)
					delete gaAckData.Remove(wndData->uacklist.Items[i]); // remove our ackdata & release structure

				mir_free(wndData->uacklist.Items);
				wndData->uacklist.Items = NULL;
				wndData->uacklist.Count = 0;
			}
			EnableDlgItem(hwndDlg, IDOK, TRUE);
			EnableDlgItem(hwndDlg, IDC_LIST, TRUE);
			ShowWindow(hwndDlg, SW_SHOWNORMAL);
			SetFocus(GetDlgItem(hwndDlg, IDC_LIST));
			break;

		case MSGERROR_DONE:
			// contacts were delivered succesfully after timeout
			SetFocus(GetDlgItem(hwndDlg, IDC_LIST));
			wndData->UnhookProtoAck();
			break;

		case MSGERROR_RETRY:// resend timeouted packets
			for (int i = 0; i < wndData->uacklist.Count; i++) {
				TAckData *lla = gaAckData.Remove(wndData->uacklist.Items[i]);
				HANDLE hProcc = (HANDLE)CallContactService(wndData->hContact, PSS_CONTACTS, MAKEWPARAM(0, lla->nContacts), (LPARAM)lla->aContacts);

				if (!hProcc) { // if fatal do not include
					wndData->uacklist.Remove(wndData->uacklist.Items[i]);
					delete lla; // release the structure
					continue;
				}
				else {
					// update process code
					wndData->uacklist.Items[i] = hProcc;
					gaAckData.Add(hProcc, lla);
				}
			}// collect TAckData for our window, resend
			break;
		}
		break;

	case WM_COMMAND:
		if (!lParam && CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wParam), MPCF_CONTACTMENU), (LPARAM)wndData->hContact))
			break;

		switch (LOWORD(wParam)) {
		case IDOK:
			if (IsWindowEnabled(GetDlgItem(hwndDlg, IDOK))) {
//.........这里部分代码省略.........
开发者ID:MrtsComputers,项目名称:miranda-ng,代码行数:101,代码来源:send.cpp


示例19: NotifyEventHooks

		se.hwnd = hwnd;
		se.extraFlags = (unsigned int)(LOWORD(subType));
		se.local = (void*)dat->sendBuffer;
		mwe.local = (void*) & se;
	}

	return NotifyEventHooks(PluginConfig.m_event_MsgWin, 0, (LPARAM)&mwe);
}

/*
 * standard icon definitions
 */

static TIconDesc _toolbaricons[] =
{
	{ "tabSRMM_mlog", LPGEN("Message Log Options"), &PluginConfig.g_buttonBarIcons[2], -IDI_MSGLOGOPT, 1 },
	{ "tabSRMM_multi", LPGEN("Image tag"), &PluginConfig.g_buttonBarIcons[3], -IDI_IMAGETAG, 1 },
	{ "tabSRMM_quote", LPGEN("Quote text"), &PluginConfig.g_buttonBarIcons[8], -IDI_QUOTE, 1 },
	{ "tabSRMM_save", LPGEN("Save and close"), &PluginConfig.g_buttonBarIcons[7], -IDI_SAVE, 1 },
	{ "tabSRMM_send", LPGEN("Send message"), &PluginConfig.g_buttonBarIcons[9], -IDI_SEND, 1 },
	{ "tabSRMM_avatar", LPGEN("Edit user notes"), &PluginConfig.g_buttonBarIcons[10], -IDI_CONTACTPIC, 1 },
	{ "tabSRMM_close", LPGEN("Close"), &PluginConfig.g_buttonBarIcons[6], -IDI_CLOSEMSGDLG, 1 }
};

static TIconDesc _exttoolbaricons[] =
{
	{ "tabSRMM_emoticon", LPGEN("Smiley button"), &PluginConfig.g_buttonBarIcons[11], -IDI_SMILEYICON, 1 },
	{ "tabSRMM_bold", LPGEN("Format bold"), &PluginConfig.g_buttonBarIcons[17], -IDI_FONTBOLD, 1 },
	{ "tabSRMM_italic", LPGEN("Format italic"), &PluginConfig.g_buttonBarIcons[18], -IDI_FONTITALIC, 1 },
	{ "tabSRMM_underline", LPGEN("Format underline"), &PluginConfig.g_buttonBarIcons[19], -IDI_FONTUNDERLINE, 1 },
	{ "tabSRMM_face", LPGEN("Font face"), &PluginConfig.g_buttonBarIcons[20], -IDI_FONTFACE, 1 },
开发者ID:MrtsComputers,项目名称:miranda-ng,代码行数:31,代码来源:msgs.cpp


示例20: switch

void CAimProto::admin_error(unsigned short error)
{
	switch(error)
	{
	case 0x01:
		ShowPopup(LPGEN("Check your Screen Name."), ERROR_POPUP);
		break;

	case 0x02:
		ShowPopup(LPGEN("Check your Password."), ERROR_POPUP);
		break;

	case 0x03:
		ShowPopup(LPGEN("Check your Email Address."), ERROR_POPUP);
		break;

	case 0x04:
		ShowPopup(LPGEN("Service temporarily unavailable."), ERROR_POPUP);
		break;

	case 0x05:
		ShowPopup(LPGEN("Field change temporarily unavailable."), ERROR_POPUP);
		break;

	case 0x06:
		ShowPopup(LPGEN("Invalid Screen Name."), ERROR_POPUP);
		break;

	case 0x07:
		ShowPopup(LPGEN("Invalid Password."), ERROR_POPUP);
		break;

	case 0x08:
		ShowPopup(LPGEN("Invalid Email."), ERROR_POPUP);
		break;

	case 0x09:
		ShowPopup(LPGEN("Invalid Registration Preference."), ERROR_POPUP);
		break;

	case 0x0a:
		ShowPopup(LPGEN("Invalid Old Password."), ERROR_POPUP);
		break;

	case 0x0b:
		ShowPopup(LPGEN("Invalid Screen Name Length."), ERROR_POPUP);
		break;

	case 0x0c:
		ShowPopup(LPGEN("Invalid Password Length."), ERROR_POPUP);
		break;

	case 0x0d:
		ShowPopup(LPGEN("Invalid Email Length."), ERROR_POPUP);
		break;

	case 0x0e:
		ShowPopup(LPGEN("Invalid Old Password Length."), ERROR_POPUP);
		break;

	case 0x0f:
		ShowPopup(LPGEN("Need Old Password."), ERROR_POPUP);
		break;

	case 0x10:
		ShowPopup(LPGEN("Read Only Field."), ERROR_POPUP);
		break;

	case 0x11:
		ShowPopup(LPGEN("Write Only Field."), ERROR_POPUP);
		break;

	case 0x12:
		ShowPopup(LPGEN("Unsupported Type."), ERROR_POPUP);
		break;

	case 0x13:
		ShowPopup(LPGEN("An Error has occured."), ERROR_POPUP);
		break;

	case 0x14:
		ShowPopup(LPGEN("Incorrect SNAC format."), ERROR_POPUP);
		break;

	case 0x15:
		ShowPopup(LPGEN("Invalid Account."), ERROR_POPUP);
		break;

	case 0x16:
		ShowPopup(LPGEN("Delete Account."), ERROR_POPUP);
		break;

	case 0x17:
		ShowPopup(LPGEN("Expired Account."), ERROR_POPUP);
		break;

	case 0x18:
		ShowPopup(LPGEN("No Database access."), ERROR_POPUP);
		break;

//.........这里部分代码省略.........
开发者ID:raoergsls,项目名称:miranda,代码行数:101,代码来源:error.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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