本文整理汇总了C++中LPGEN函数的典型用法代码示例。如果您正苦于以下问题:C++ LPGEN函数的具体用法?C++ LPGEN怎么用?C++ LPGEN使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LPGEN函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
//.........这里部分代码省略.........
示例2: IconsInit
void IconsInit(void)
{
Icon_Register(g_hInst, LPGEN("Simple Status Message"), iconList, SIZEOF(iconList), "SimpleStatusMsg");
}
示例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);
}
示例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)
示例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 },
示例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;
}
示例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;
示例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);
示例9: InitIcolib
static void InitIcolib()
{
Icon_Register(hInst, LPGEN("FTP File"), iconList, SIZEOF(iconList), MODULE);
}
示例10: LoadIcons
// Load icons
void LoadIcons(void)
{
Icon_Register(hInst, LPGEN("Nudge"), iconList, _countof(iconList));
}
示例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);
示例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)
示例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;
示例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;
}
示例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);
}
}
}