当前位置: 首页>>代码示例>>C++>>正文


C++ LPGENT函数代码示例

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


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

示例1: LPGENT

MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

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.

*/

#include "jabber.h"
#include "jabber_iq.h"
#include "jabber_caps.h"
#include "version.h"

const JabberFeatCapPair g_JabberFeatCapPairs[] = {
	{ JABBER_FEAT_DISCO_INFO,           JABBER_CAPS_DISCO_INFO,           LPGENT("Supports Service Discovery info") },
	{ JABBER_FEAT_DISCO_ITEMS,          JABBER_CAPS_DISCO_ITEMS,          LPGENT("Supports Service Discovery items list") },
	{ JABBER_FEAT_ENTITY_CAPS,          JABBER_CAPS_ENTITY_CAPS,          LPGENT("Can inform about its Jabber capabilities") },
	{ JABBER_FEAT_SI,                   JABBER_CAPS_SI,                   LPGENT("Supports stream initiation (for filetransfers for ex.)") },
	{ JABBER_FEAT_SI_FT,                JABBER_CAPS_SI_FT,                LPGENT("Supports stream initiation for file transfers") },
	{ JABBER_FEAT_BYTESTREAMS,          JABBER_CAPS_BYTESTREAMS,          LPGENT("Supports file transfers via SOCKS5 Bytestreams") },
	{ JABBER_FEAT_IBB,                  JABBER_CAPS_IBB,                  LPGENT("Supports file transfers via In-Band Bytestreams") },
	{ JABBER_FEAT_OOB,                  JABBER_CAPS_OOB,                  LPGENT("Supports file transfers via Out-of-Band Bytestreams") },
	{ JABBER_FEAT_OOB2,                 JABBER_CAPS_OOB,                  LPGENT("Supports file transfers via Out-of-Band Bytestreams") },
	{ JABBER_FEAT_COMMANDS,             JABBER_CAPS_COMMANDS,             LPGENT("Supports execution of Ad-Hoc commands") },
	{ JABBER_FEAT_REGISTER,             JABBER_CAPS_REGISTER,             LPGENT("Supports in-band registration") },
	{ JABBER_FEAT_MUC,                  JABBER_CAPS_MUC,                  LPGENT("Supports multi-user chat") },
	{ JABBER_FEAT_CHATSTATES,           JABBER_CAPS_CHATSTATES,           LPGENT("Can report chat state in a chat session") },
	{ JABBER_FEAT_LAST_ACTIVITY,        JABBER_CAPS_LAST_ACTIVITY,        LPGENT("Can report information about the last activity of the user") },
	{ JABBER_FEAT_VERSION,              JABBER_CAPS_VERSION,              LPGENT("Can report own version information") },
	{ JABBER_FEAT_ENTITY_TIME,          JABBER_CAPS_ENTITY_TIME,          LPGENT("Can report local time of the user") },
开发者ID:MrtsComputers,项目名称:miranda-ng,代码行数:31,代码来源:jabber_caps.cpp

示例2: 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)));
		SetAllContactChecks(GetDlgItem(hwndDlg, IDC_LIST), lParam);
		WindowList_Add(g_hSendWindowList, hwndDlg, lParam);
		wndData = new TSendContactsData(lParam);
		SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)wndData);
		// new dlg init 
		wndData->hIcons[0] = InitMButton(hwndDlg, IDC_ADD, SKINICON_OTHER_ADDCONTACT, LPGENT("Add Contact Permanently to List"));
		wndData->hIcons[1] = InitMButton(hwndDlg, IDC_DETAILS, SKINICON_OTHER_USERDETAILS, LPGENT("View User's Details"));
		wndData->hIcons[2] = InitMButton(hwndDlg, IDC_HISTORY, SKINICON_OTHER_HISTORY, LPGENT("View User's History"));
		wndData->hIcons[3] = InitMButton(hwndDlg, IDC_USERMENU, SKINICON_OTHER_DOWNARROW, LPGENT("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);
			}
		}
		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 g_aAckData.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 = g_aAckData.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;
					g_aAckData.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))) {
				MCONTACT hContact, hItem;
				wndData->ClearContacts(); // do not include contacts twice

				HWND hList = GetDlgItem(hwndDlg, IDC_LIST);
//.........这里部分代码省略.........
开发者ID:ybznek,项目名称:miranda-ng,代码行数:101,代码来源:send.cpp

示例3: SkinAddNewSoundExT

/**
 * Sounds initialization
 */
void FacebookProto::InitSounds()
{
	SkinAddNewSoundExT("Notification", m_tszUserName, LPGENT("Notification"));
	SkinAddNewSoundExT("NewsFeed", m_tszUserName, LPGENT("News Feed"));
	SkinAddNewSoundExT("OtherEvent", m_tszUserName, LPGENT("Other Event"));
}
开发者ID:Ganster41,项目名称:miranda-ng,代码行数:9,代码来源:proto.cpp

示例4: TimeZone_ToLocal

					//perform LOCALTOTIMESTAMP
					res = (DWORD)ll - TimeZone_ToLocal(0);
					//nevel look for Year/Month/Day/Hour/Minute/Second again
					db_set_dw(hcontact, S_MOD, "seenTS", res);
				}
			}
		}
	}

	if (st)
		memcpy(st, &lst, sizeof(SYSTEMTIME));

	return res;
}

TCHAR *weekdays[] = { LPGENT("Sunday"), LPGENT("Monday"), LPGENT("Tuesday"), LPGENT("Wednesday"), LPGENT("Thursday"), LPGENT("Friday"), LPGENT("Saturday") };
TCHAR *wdays_short[] = { LPGENT("Sun."), LPGENT("Mon."), LPGENT("Tue."), LPGENT("Wed."), LPGENT("Thu."), LPGENT("Fri."), LPGENT("Sat.") };
TCHAR *monthnames[] = { LPGENT("January"), LPGENT("February"), LPGENT("March"), LPGENT("April"), LPGENT("May"), LPGENT("June"), LPGENT("July"), LPGENT("August"), LPGENT("September"), LPGENT("October"), LPGENT("November"), LPGENT("December") };
TCHAR *mnames_short[] = { LPGENT("Jan."), LPGENT("Feb."), LPGENT("Mar."), LPGENT("Apr."), LPGENT("May"), LPGENT("Jun."), LPGENT("Jul."), LPGENT("Aug."), LPGENT("Sep."), LPGENT("Oct."), LPGENT("Nov."), LPGENT("Dec.") };

TCHAR* ParseString(TCHAR *szstring, MCONTACT hcontact)
{
#define MAXSIZE 1024
	static TCHAR sztemp[MAXSIZE + 1];
	TCHAR szdbsetting[128];
	TCHAR *charPtr;
	int isetting = 0;
	DWORD dwsetting = 0;
	struct in_addr ia;
	DBVARIANT dbv;
开发者ID:Seldom,项目名称:miranda-ng,代码行数:30,代码来源:utils.cpp

示例5: DlgProcPopupGeneral

INT_PTR CALLBACK DlgProcPopupGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
	static bool bDlgInit = false;	//some controls send WM_COMMAND before or during WM_INITDIALOG

	static OPTTREE_OPTION *statusOptions = NULL;
	static int statusOptionsCount = 0;
	if (statusOptions) {
		int index;
		if (OptTree_ProcessMessage(hwnd, msg, wParam, lParam, &index, IDC_STATUSES, statusOptions, statusOptionsCount))
			return TRUE;
	}

	switch (msg) {
	case WM_INITDIALOG:
		//Seconds of delay
		CheckDlgButton(hwnd, IDC_INFINITEDELAY, PopupOptions.InfiniteDelay);
		CheckDlgButton(hwnd, IDC_LEAVEHOVERED, PopupOptions.LeaveHovered);
		EnableWindow(GetDlgItem(hwnd, IDC_SECONDS), !PopupOptions.InfiniteDelay);
		EnableWindow(GetDlgItem(hwnd, IDC_SECONDS_STATIC1), !PopupOptions.InfiniteDelay);
		EnableWindow(GetDlgItem(hwnd, IDC_SECONDS_STATIC2), !PopupOptions.InfiniteDelay);
		EnableWindow(GetDlgItem(hwnd, IDC_LEAVEHOVERED), !PopupOptions.InfiniteDelay);
		SetDlgItemInt(hwnd, IDC_SECONDS, PopupOptions.Seconds, FALSE);
		SendDlgItemMessage(hwnd, IDC_SECONDS_SPIN, UDM_SETRANGE, 0, (LPARAM)MAKELONG(SETTING_LIFETIME_MAX, SETTING_LIFETIME_MIN));

		//Dynamic Resize
		CheckDlgButton(hwnd, IDC_DYNAMICRESIZE, PopupOptions.DynamicResize);
		SetDlgItemText(hwnd, IDC_USEMAXIMUMWIDTH, PopupOptions.DynamicResize ? LPGENT("Maximum width") : LPGENT("Width"));
		//Minimum Width
		CheckDlgButton(hwnd, IDC_USEMINIMUMWIDTH, PopupOptions.UseMinimumWidth);
		SendDlgItemMessage(hwnd, IDC_MINIMUMWIDTH_SPIN, UDM_SETRANGE, 0, (LPARAM)MAKELONG(SETTING_MAXIMUMWIDTH_MAX, SETTING_MINIMUMWIDTH_MIN));
		SetDlgItemInt(hwnd, IDC_MINIMUMWIDTH, PopupOptions.MinimumWidth, FALSE);
		//Maximum Width
		PopupOptions.UseMaximumWidth = PopupOptions.DynamicResize ? PopupOptions.UseMaximumWidth : TRUE;
		CheckDlgButton(hwnd, IDC_USEMAXIMUMWIDTH, PopupOptions.UseMaximumWidth);
		SendDlgItemMessage(hwnd, IDC_MAXIMUMWIDTH_SPIN, UDM_SETRANGE, 0, (LPARAM)MAKELONG(SETTING_MAXIMUMWIDTH_MAX, SETTING_MINIMUMWIDTH_MIN));
		SetDlgItemInt(hwnd, IDC_MAXIMUMWIDTH, PopupOptions.MaximumWidth, FALSE);
		//And finally let's enable/disable them.
		EnableWindow(GetDlgItem(hwnd, IDC_USEMINIMUMWIDTH), PopupOptions.DynamicResize);
		EnableWindow(GetDlgItem(hwnd, IDC_MINIMUMWIDTH), PopupOptions.DynamicResize && PopupOptions.UseMinimumWidth);
		EnableWindow(GetDlgItem(hwnd, IDC_MINIMUMWIDTH_SPIN), PopupOptions.DynamicResize && PopupOptions.UseMinimumWidth);
		EnableWindow(GetDlgItem(hwnd, IDC_MAXIMUMWIDTH), PopupOptions.UseMaximumWidth);
		EnableWindow(GetDlgItem(hwnd, IDC_MAXIMUMWIDTH_SPIN), PopupOptions.UseMaximumWidth);

		//Position combobox.
		{
			HWND hCtrl = GetDlgItem(hwnd, IDC_WHERE);
			ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("Upper left corner")), POS_UPPERLEFT);
			ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("Lower left corner")), POS_LOWERLEFT);
			ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("Lower right corner")), POS_LOWERRIGHT);
			ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("Upper right corner")), POS_UPPERRIGHT);
			SendDlgItemMessage(hwnd, IDC_WHERE, CB_SETCURSEL, PopupOptions.Position, 0);
		}
		//Configure popup area
		{
			HWND hCtrl = GetDlgItem(hwnd, IDC_CUSTOMPOS);
			SendMessage(hCtrl, BUTTONSETASFLATBTN, TRUE, 0);
			SendMessage(hCtrl, BUTTONADDTOOLTIP, (WPARAM)_T("Popup area"), BATF_TCHAR);
			SendMessage(hCtrl, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIcon(ICO_OPT_RESIZE, 0));
		}
		//Spreading combobox
		{
			HWND hCtrl = GetDlgItem(hwnd, IDC_LAYOUT);
			ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("Horizontal")), SPREADING_HORIZONTAL);
			ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("Vertical")), SPREADING_VERTICAL);
			SendDlgItemMessage(hwnd, IDC_LAYOUT, CB_SETCURSEL, PopupOptions.Spreading, 0);
		}
		//miscellaneous
		CheckDlgButton(hwnd, IDC_REORDERPOPUPS, PopupOptions.ReorderPopups);

		//Popup enabled
		CheckDlgButton(hwnd, IDC_POPUPENABLED, PopupOptions.ModuleIsEnabled ? BST_UNCHECKED : BST_CHECKED);
		CheckDlgButton(hwnd, IDC_DISABLEINFS, PopupOptions.DisableWhenFullscreen);
		EnableWindow(GetDlgItem(hwnd, IDC_DISABLEINFS), PopupOptions.ModuleIsEnabled);
		EnableWindow(GetDlgItem(hwnd, IDC_STATUSES), PopupOptions.ModuleIsEnabled);

		//new status options
		{
			int protocolCount = 0;
			PROTOACCOUNT **protocols;
			ProtoEnumAccounts(&protocolCount, &protocols);
			DWORD globalFlags = 0;
			for (int i = 0; i < protocolCount; ++i) {
				DWORD protoFlags = CallProtoService(protocols[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0);
				globalFlags |= protoFlags;
				statusOptionsCount += CountStatusModes(protoFlags);
			}
			statusOptionsCount += CountStatusModes(globalFlags);

			statusOptions = new OPTTREE_OPTION[statusOptionsCount];

			int pos = AddStatusModes(statusOptions, 0, LPGENT("Global Status"), globalFlags);
			for (int i = 0; i < protocolCount; ++i) {
				DWORD protoFlags = CallProtoService(protocols[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0);
				if (!CountStatusModes(protoFlags))
					continue;
				
				TCHAR prefix[128];
				mir_sntprintf(prefix, SIZEOF(prefix), LPGENT("Protocol Status")_T("/%s"), protocols[i]->tszAccountName);
				pos = AddStatusModes(statusOptions, pos, prefix, protoFlags);
			}
//.........这里部分代码省略.........
开发者ID:0xmono,项目名称:miranda-ng,代码行数:101,代码来源:opt_gen.cpp

示例6: LPGENT

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

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.
*/

#include "..\..\core\commonheaders.h"

#define NAMEORDERCOUNT 9
static TCHAR* nameOrderDescr[ NAMEORDERCOUNT ] =
{
	LPGENT("My custom name (not movable)"),
	LPGENT("Nick"),
	LPGENT("FirstName"),
	LPGENT("E-mail"),
	LPGENT("LastName"),
	LPGENT("Username"),
	LPGENT("FirstName LastName"),
	LPGENT("LastName FirstName"),
	LPGENT("'(Unknown contact)' (not movable)")
};

BYTE nameOrder[NAMEORDERCOUNT];

static int GetDatabaseString(CONTACTINFO *ci, const char* setting, DBVARIANT* dbv)
{
	if (strcmp(ci->szProto, "CList") && CallProtoService(ci->szProto, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_INFOSETTINGSVC) {
开发者ID:Ganster41,项目名称:miranda-ng,代码行数:31,代码来源:contacts.cpp

示例7: CalcXMask

		cfg::eCache[nextCacheEntry].status_item = NULL;
		cfg::eCache[nextCacheEntry].dwCFlags = 0;
		cfg::eCache[nextCacheEntry].dwXMask = CalcXMask(hContact);
		GetCachedStatusMsg(nextCacheEntry, const_cast<char *>(szProto));
		cfg::eCache[nextCacheEntry].dwLastMsgTime = INTSORT_GetLastMsgTime(hContact);
		iFound = nextCacheEntry++;
		LeaveCriticalSection(&cachecs);
	}
	return iFound;
}

static struct {
	UINT 	id;
	TCHAR*	name;
} _tagFSINFO[] = {
	FONTID_CONTACTS, LPGENT("Standard contacts"),
	FONTID_INVIS, LPGENT("Online contacts to whom you have a different visibility"),
	FONTID_OFFLINE, LPGENT("Offline contacts"),
	FONTID_OFFINVIS, LPGENT("Offline contacts to whom you have a different visibility"),
	FONTID_NOTONLIST, LPGENT("Contacts which are 'not on list'"),
	FONTID_GROUPS, LPGENT("Groups"),
	FONTID_GROUPCOUNTS, LPGENT("Group member counts"),
	FONTID_DIVIDERS, LPGENT("Dividers"),
	FONTID_STATUS, LPGENT("Status mode"),
	FONTID_FRAMETITLE, LPGENT("Frame titles"),
	FONTID_EVENTAREA, LPGENT("Event area"),
	FONTID_TIMESTAMP, LPGENT("Contact list local time"),
	0, NULL
};

struct ColorOptionsList {
开发者ID:Seldom,项目名称:miranda-ng,代码行数:31,代码来源:config.cpp

示例8: DllMain

///////////////////////////////////////////////////////
// Load / unload

BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD, LPVOID)
{
	hInst = hinstDLL;
	return TRUE;
}

/////////////////////////////////////////////////////////////////////////////
// Fonts

static LPCTSTR s_fonts[FLT_FONTIDS] =
{
	{ LPGENT("Standard contacts") },
	{ LPGENT("Online contacts to whom you have a different visibility") },
	{ LPGENT("Offline contacts") },
	{ LPGENT("Offline contacts to whom you have a different visibility") },
	{ LPGENT("Contacts which are 'not on list'") }
};

///////////////////////////////////////////////////////
// Hooked events

static int OnContactDeleted(WPARAM hContact, LPARAM)
{
	ThumbInfo *pThumb = thumbList.FindThumbByContact(hContact);
	if (pThumb) {
		pThumb->DeleteContactPos();
		thumbList.RemoveThumb(pThumb);
开发者ID:kxepal,项目名称:miranda-ng,代码行数:30,代码来源:main.cpp

示例9: LPGENT

		LPGENT("Messages (outgoing)"),
		LPGENT("Messages (all)"),
		LPGENT("Messages (in/out ratio)"),
		LPGENT("Chats (incoming)"),
		LPGENT("Chats (outgoing)"),
		LPGENT("Chats (all)"),
		LPGENT("Chats (in/out ratio)"),
	};

	array_each_(i, sourceTexts)
	{
		Opt.addComboItem(m_hSource, TranslateTS(sourceTexts[i]));
	}

	static const TCHAR* unitTexts[] = {
		LPGENT("Hours"),
		LPGENT("Days"),
		LPGENT("Weeks"),
	};

	array_each_(i, unitTexts)
	{
		Opt.addComboItem(m_hBlockUnit, TranslateTS(unitTexts[i]));
	}

	Opt.setComboSelected(m_hSource       , 4 * m_nSource + m_nSourceType);
	Opt.setEditNumber   (m_hIgnoreOld    , m_nIgnoreOld                 );
	Opt.setRadioChecked (m_hVisMode      , m_nVisMode                   );
	Opt.setEditNumber   (m_hHODGroup     , m_nHODGroup                  );
	Opt.setEditNumber   (m_hDOWGroup     , m_nDOWGroup                  );
	Opt.setComboSelected(m_hBlockUnit    , m_nBlockUnit                 );
开发者ID:kxepal,项目名称:miranda-ng,代码行数:31,代码来源:column_splittimeline.cpp

示例10: TranslateDialogDefault

void DlgOption::SubOutput::onWMInitDialog()
{
	TranslateDialogDefault(getHWnd());

	// init option tree(s)
	m_Options << GetDlgItem(getHWnd(), IDC_OPTIONS);

	// settings
	OptionsCtrl::Item hTemp;
	OptionsCtrl::Item hTemp2;

	hTemp                              = m_Options.insertGroup(NULL, TranslateT("Contact filtering and totals"), OptionsCtrl::OCF_ROOTGROUP | OptionsCtrl::OCF_NODISABLECHILDS);
		m_hRemoveEmptyContacts          = m_Options.insertCheck(hTemp, TranslateT("Remove contacts with empty history"));
		m_hRemoveOutChatsZero           = m_Options.insertCheck(hTemp, TranslateT("Remove contacts with only incoming chats"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
			m_hRemoveOutBytesZero        = m_Options.insertCheck(m_hRemoveOutChatsZero, TranslateT("Remove only if you never answered"));
		m_hRemoveInChatsZero            = m_Options.insertCheck(hTemp, TranslateT("Remove contacts with only outgoing chats"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
			m_hRemoveInBytesZero         = m_Options.insertCheck(m_hRemoveInChatsZero, TranslateT("Remove only if contact never answered"));
		m_hOmitContacts                 = m_Options.insertCheck(hTemp, TranslateT("Limit number of contacts in statistics"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
			hTemp2                       = m_Options.insertGroup(m_hOmitContacts, TranslateT("Criteria"));
				m_hOmitByValue            = m_Options.insertCheck(hTemp2, TranslateT("Omit contacts that didn't produce a certain amount of data"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
					m_hOmitByValueData     = m_Options.insertCombo(m_hOmitByValue, TranslateT("Omit if"));
					m_hOmitByValueLimit    = m_Options.insertEdit(m_hOmitByValue, TranslateT("...is less than"), _T(""), OptionsCtrl::OCF_NUMBER);
				m_hOmitByTime             = m_Options.insertCheck(hTemp2, TranslateT("Omit contacts that were inactive for some time"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
					m_hOmitByTimeDays      = m_Options.insertEdit(m_hOmitByTime, TranslateT("Maximum inactivity time (days)"), _T(""), OptionsCtrl::OCF_NUMBER);
				m_hOmitByRank             = m_Options.insertCheck(hTemp2, TranslateT("Omit all contacts not in \"Top n\""), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
					m_hOmitNumOnTop        = m_Options.insertEdit(m_hOmitByRank, TranslateT("Number of contacts in \"Top n\""), _T("10"), OptionsCtrl::OCF_NUMBER);
			m_hOmittedInTotals           = m_Options.insertCheck(m_hOmitContacts, TranslateT("Include omitted contacts in totals"));
			m_hOmittedInExtraRow         = m_Options.insertCheck(m_hOmitContacts, TranslateT("Include totals of omitted contacts in additional row"));
		m_hCalcTotals                   = m_Options.insertCheck(hTemp, TranslateT("Include totals in statistics"));
	hTemp                              = m_Options.insertGroup(NULL, TranslateT("Table header"), OptionsCtrl::OCF_ROOTGROUP | OptionsCtrl::OCF_NODISABLECHILDS);
		m_hTableHeader                  = m_Options.insertCheck(hTemp, TranslateT("Output header"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK | OptionsCtrl::OCF_DISABLED | OptionsCtrl::OCF_NODISABLECHILDS);
			m_hTableHeaderRepeat         = m_Options.insertEdit(m_hTableHeader, TranslateT("Repeat header every n contacts (0=don't repeat)"), _T("0"), OptionsCtrl::OCF_NUMBER);
			m_hTableHeaderVerbose        = m_Options.insertCheck(m_hTableHeader, TranslateT("Make column titles more verbose"));
			m_hHeaderTooltips            = m_Options.insertCheck(m_hTableHeader, TranslateT("Show tooltips with detailed information in column titles"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
				m_hHeaderTooltipsIfCustom = m_Options.insertCheck(m_hHeaderTooltips, TranslateT("Only show if a custom title was entered or if titles are not verbose"));
	m_hSort                            = m_Options.insertGroup(NULL, TranslateT("Sorting"), OptionsCtrl::OCF_ROOTGROUP);
	hTemp                              = m_Options.insertGroup(NULL, TranslateT("HTML file generation"), OptionsCtrl::OCF_ROOTGROUP);
		m_hNick                         = m_Options.insertEdit(hTemp, TranslateT("Own nick for statistics"));
	    hTemp2                         = m_Options.insertGroup(hTemp, TranslateT("Output files and folders"));
			m_hOutputVariables           = m_Options.insertCheck(hTemp2, TranslateT("Substitute variables in output file name and subfolder for additional files"));
			m_hOutputFile                = m_Options.insertEdit(hTemp2, TranslateT("Output file"));
			m_hOutputExtraToFolder       = m_Options.insertCheck(hTemp2, TranslateT("Output additional files to subfolder"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
				m_hOutputExtraFolder      = m_Options.insertEdit(m_hOutputExtraToFolder, TranslateT("Subfolder for additional files"));
			m_hOverwriteAlways           = m_Options.insertCheck(hTemp2, TranslateT("Always overwrite already existing files (dangerous!)"));
		hTemp2                          = m_Options.insertGroup(hTemp, TranslateT("Auto open statistics after being generated..."));
			m_hAutoOpenOptions           = m_Options.insertCheck(hTemp2, TranslateT("...via button \"Create statistics\" in options"));
			m_hAutoOpenStartup           = m_Options.insertCheck(hTemp2, TranslateT("...on Miranda NG startup"));
			m_hAutoOpenMenu              = m_Options.insertCheck(hTemp2, TranslateT("...via Miranda NG main menu"));

	// our sort levels
	static const TCHAR* sortLevels[Settings::cNumSortLevels] = {
		LPGENT("First sort by"),
		LPGENT("Then sort by"),
		LPGENT("Finally sort by")
	};

	// our sort keys
	static const struct {
		int key;
		TCHAR* desc;
	} sortKeys[] = {
		{ Settings::skNick              , LPGENT("Nick")                                  },
		{ Settings::skProtocol          , LPGENT("Protocol")                              },
		{ Settings::skGroup             , LPGENT("Group")                                 },
		{ Settings::skBytesIn           , LPGENT("Characters (incoming, absolute)")       },
		{ Settings::skBytesOut          , LPGENT("Characters (outgoing, absolute)")       },
		{ Settings::skBytesTotal        , LPGENT("Characters (all, absolute)")            },
		{ Settings::skBytesInAvg        , LPGENT("Characters (incoming, average)")        },
		{ Settings::skBytesOutAvg       , LPGENT("Characters (outgoing, average)")        },
		{ Settings::skBytesTotalAvg     , LPGENT("Characters (all, average)")             },
		{ Settings::skMessagesIn        , LPGENT("Messages (incoming, absolute)")         },
		{ Settings::skMessagesOut       , LPGENT("Messages (outgoing, absolute)")         },
		{ Settings::skMessagesTotal     , LPGENT("Messages (all, absolute)")              },
		{ Settings::skMessagesInAvg     , LPGENT("Messages (incoming, average)")          },
		{ Settings::skMessagesOutAvg    , LPGENT("Messages (outgoing, average)")          },
		{ Settings::skMessagesTotalAvg  , LPGENT("Messages (all, average)")               },
		{ Settings::skChatsIn           , LPGENT("Chats (incoming, absolute)")            },
		{ Settings::skChatsOut          , LPGENT("Chats (outgoing, absolute)")            },
		{ Settings::skChatsTotal        , LPGENT("Chats (all, absolute)")                 },
		{ Settings::skChatsInAvg        , LPGENT("Chats (incoming, average)")             },
		{ Settings::skChatsOutAvg       , LPGENT("Chats (outgoing, average)")             },
		{ Settings::skChatsTotalAvg     , LPGENT("Chats (all, average)")                  },
		{ Settings::skChatDurationTotal , LPGENT("Chat duration (total)")                 },
		{ Settings::skChatDurationMin   , LPGENT("Chat duration (minimum)")               },
		{ Settings::skChatDurationAvg   , LPGENT("Chat duration (average)")               },
		{ Settings::skChatDurationMax   , LPGENT("Chat duration (maximum)")               },
		{ Settings::skTimeOfFirstMessage, LPGENT("Time of first message to/from contact") },
		{ Settings::skTimeOfLastMessage , LPGENT("Time of last message to/from contact")  },
	};

	m_SortKeyToIndex.resize(Settings::skLAST - Settings::skFIRST + 1);
	m_IndexToSortKey.resize(array_len(sortKeys));

	array_each_(i, sortKeys)
	{
		m_IndexToSortKey[i] = sortKeys[i].key;
		m_SortKeyToIndex[sortKeys[i].key] = i;
	}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:98,代码来源:dlgoption_suboutput.cpp

示例11: _T


//.........这里部分代码省略.........
				_T("^\\s*(Selection|Window)Size\\s*=\\s*(\\d+)\\s*,\\s*(\\d+)"),
				_TPattern::MULTILINE_MATCHING);
			_TMatcher *m0 = pat->createTMatcher(tbuf);
			while (m0->findNextMatch()) {
				POINT tpt;
				tpt.x = _ttol(m0->getGroup(2).c_str());
				tpt.y = _ttol(m0->getGroup(3).c_str());

				if (m0->getGroup(1) == _T("Selection"))
					selec = tpt;
				else if (m0->getGroup(1) == _T("Window"))
					win = tpt;
			}
			delete m0;
			delete pat;
		}

		_TPattern *smiley = _TPattern::compile(
			_T("^\\s*Smiley(\\*)?\\s*=")	// Is Hidden
			_T("(?:\\s*\"(.*)\")")			// Smiley file name
			_T("(?:[\\s,]+(\\-?\\d+))")		// Icon resource id
			_T("(?:[\\s,]+(R|S)?\"(.*?)\")")	// Trigger text
			_T("(?:[\\s,]+\"(.*?)\")?")		// Tooltip or insert text
			_T("(?:[\\s,]+\"(.*?)\")?"),		// Tooltip text
			_TPattern::MULTILINE_MATCHING);

		SmileyVectorType hiddenSmileys;
		unsigned smnum = 0;
		{
			_TMatcher *m0 = smiley->createTMatcher(tbuf);
			while (m0->findNextMatch()) {
				CMString resname = m0->getGroup(2);
				if (resname.Find(_T("http://")) != -1) {
					if (GetSmileyFile(resname, packstr))
						continue;
				}
				else if (!resname.IsEmpty())
					resname.Insert(0, pathstr);

				SmileyType *dat = new SmileyType;

				const int iconIndex = _ttol(m0->getGroup(3).c_str());

				dat->SetHidden(m0->getStartingIndex(1) >= 0);
				if (m0->getStartingIndex(4) >= 0) {
					dat->SetRegEx(m0->getGroup(4) == _T("R"));
					dat->SetService(m0->getGroup(4) == _T("S"));
				}
				dat->m_TriggerText = m0->getGroup(5);
				if (dat->IsRegEx()) {
					if (m0->getStartingIndex(6) >= 0)
						ReplaceAllSpecials(m0->getGroup(6), dat->m_InsertText);

					if (m0->getStartingIndex(7) >= 0)
						ReplaceAllSpecials(m0->getGroup(7), dat->m_ToolText);
					else
						dat->m_ToolText = dat->m_InsertText;
				}
				else {
					if (m0->getStartingIndex(6) >= 0)
						ReplaceAllSpecials(m0->getGroup(6), dat->m_ToolText);
					else
						ReplaceAllSpecials(dat->m_TriggerText, dat->m_ToolText);
				}

				bool noerr;
				if (resname.IsEmpty()) {
					dat->SetHidden(true);
					dat->SetText(true);
					noerr = true;
				}
				else noerr = dat->LoadFromResource(resname, iconIndex);

				if (dat->IsHidden())
					hiddenSmileys.insert(dat);
				else
					m_SmileyList.insert(dat);

				if (!noerr) {
					static const TCHAR errmsg[] = LPGENT("Smiley #%u in file %s for smiley pack %s not found.");
					TCHAR msgtxt[1024];
					mir_sntprintf(msgtxt, TranslateTS(errmsg), smnum, resname.c_str(), modpath.c_str());
					CallService(MS_NETLIB_LOG, (WPARAM)hNetlibUser, _T2A(msgtxt));
					errorFound = true;
				}
				smnum++;
			}
			delete smiley;
			delete m0;
		}

		m_VisibleCount = m_SmileyList.getCount();

		m_SmileyList.splice(hiddenSmileys);

		AddTriggersToSmileyLookup();
	}

	return true;
}
开发者ID:kxepal,项目名称:miranda-ng,代码行数:101,代码来源:smileys.cpp

示例12: Clear

bool SmileyPackType::LoadSmileyFile(const CMString& filename, const CMString& packname, bool onlyInfo, bool noerr)
{
	Clear();

	if (filename.IsEmpty()) {
		m_Name = _T("Nothing loaded");
		return false;
	}

	CMString modpath;
	pathToAbsolute(filename, modpath);

	// Load xep file
	int fh = _topen(modpath.c_str(), _O_BINARY | _O_RDONLY);
	if (fh == -1) {
		if (!noerr) {
			static const TCHAR errmsg[] = LPGENT("Smiley pack %s for category \"%s\" not found.\nSelect correct smiley pack in the Options -> Customize -> Smileys.");
			TCHAR msgtxt[1024];
			mir_sntprintf(msgtxt, TranslateTS(errmsg), modpath.c_str(), packname);
			ReportError(msgtxt);
		}

		m_Name = _T("Nothing loaded");
		return false;
	}

	m_Filename = filename;

	// Find file size
	const long flen = _filelength(fh);

	// Allocate file buffer
	char* buf = new char[flen + sizeof(wchar_t)];

	// Read xep file in
	int len = _read(fh, buf, flen);
	*(wchar_t*)(buf + len) = 0;

	// Close file
	_close(fh);

	CMString tbuf;

	if (len > 2 && *(wchar_t*)buf == 0xfeff)
		tbuf = W2T_SM((wchar_t*)buf + 1);
	else if (len > 3 && buf[0] == '\xef' && buf[1] == '\xbb' && buf[2] == '\xbf')
		tbuf = W2T_SM(A2W_SM(buf + 3, CP_UTF8));
	else
		tbuf = A2T_SM(buf);

	delete[] buf;

	bool res;
	if (filename.Find(_T(".xep")) == -1)
		res = LoadSmileyFileMSL(tbuf, onlyInfo, modpath);
	else
		res = LoadSmileyFileXEP(tbuf, onlyInfo, modpath);

	if (errorFound)
		ReportError(TranslateT("There were problems loading smiley pack (it should be corrected).\nSee network log for details."));

	return res;
}
开发者ID:kxepal,项目名称:miranda-ng,代码行数:63,代码来源:smileys.cpp

示例13: mdb_env_set_mapsize

	mdb_env_set_mapsize(m_pMdbEnv, m_dwFileSize);

	int mode = MDB_NOSYNC | MDB_NOSUBDIR;
	if (m_bReadOnly)
		mode += MDB_RDONLY;
	else
		mode += MDB_WRITEMAP;
	return mdb_env_open(m_pMdbEnv, _T2A(m_tszProfileName), mode, 0664) == MDB_SUCCESS;
}

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

static DWORD DatabaseCorrupted = 0;
static const TCHAR *msg = NULL;
static DWORD dwErr = 0;
static TCHAR tszPanic[] = LPGENT("Miranda has detected corruption in your database. This corruption may be fixed by DbChecker plugin. Please download it from http://miranda-ng.org/p/DbChecker/. Miranda will now shut down.");

void __cdecl dbpanic(void *)
{
	if (msg) {
		if (dwErr == ERROR_DISK_FULL)
			msg = TranslateT("Disk is full. Miranda will now shut down.");

		TCHAR err[256];
		mir_sntprintf(err, SIZEOF(err), msg, TranslateT("Database failure. Miranda will now shut down."), dwErr);

		MessageBox(0, err, TranslateT("Database Error"), MB_SETFOREGROUND | MB_TOPMOST | MB_APPLMODAL | MB_ICONWARNING | MB_OK);
	}
	else MessageBox(0, TranslateTS(tszPanic), TranslateT("Database Panic"), MB_SETFOREGROUND | MB_TOPMOST | MB_APPLMODAL | MB_ICONWARNING | MB_OK);
	TerminateProcess(GetCurrentProcess(), 255);
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:31,代码来源:dbintf.cpp

示例14: TranslateT

void ColSplitTimeline::impl_configToUI(OptionsCtrl& Opt, OptionsCtrl::Item hGroup)
{
	OptionsCtrl::Group hTemp;
	OptionsCtrl::Radio hTempRadio;

	m_hSource                 = Opt.insertCombo(hGroup, TranslateT("Data source"));
	m_hIgnoreOld              = Opt.insertEdit(hGroup, TranslateT("Drop everything older than (days, 0=no limit)"), _T(""), OptionsCtrl::OCF_NUMBER);
	hTemp                     = Opt.insertGroup(hGroup, TranslateT("\"Split\" type"));
		m_hVisMode             = Opt.insertRadio(hTemp, NULL, TranslateT("Hours of day"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
			m_hHODGroup         = Opt.insertEdit (m_hVisMode, TranslateT("Number of days to group"), _T(""), OptionsCtrl::OCF_NUMBER);
		hTempRadio             = Opt.insertRadio(hTemp, m_hVisMode, TranslateT("Days of week"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
			m_hDOWGroup         = Opt.insertEdit (hTempRadio, TranslateT("Number of weeks to group"), _T(""), OptionsCtrl::OCF_NUMBER);
		hTempRadio             = Opt.insertRadio(hTemp, m_hVisMode, TranslateT("Custom (for experts only)"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
			hTemp               = Opt.insertGroup(hTempRadio, TranslateT("Column setup"));
				m_hBlockUnit     = Opt.insertCombo(hTemp, TranslateT("Block unit"));
				m_hUnitsPerBlock = Opt.insertEdit (hTemp, TranslateT("Units per block"), _T(""), OptionsCtrl::OCF_NUMBER);
				m_hBlocks        = Opt.insertEdit (hTemp, TranslateT("Blocks per column"), _T(""), OptionsCtrl::OCF_NUMBER);
			hTemp               = Opt.insertGroup(hTempRadio, TranslateT("Graph alignment"));
				m_hGraphAlign    = Opt.insertRadio(hTemp, NULL, TranslateT("Align on day boundary"));
				                   Opt.insertRadio(hTemp, m_hGraphAlign, TranslateT("Align on week boundary"));
			m_hCustomGroup      = Opt.insertEdit (hTempRadio, TranslateT("Number of columns to group"), _T(""), OptionsCtrl::OCF_NUMBER);
	m_hTopPerColumn           = Opt.insertCheck(hGroup, TranslateT("Calculate maximum per column (not per graph)"));

	static const TCHAR* sourceTexts[] = {
		LPGENT("Characters (incoming)"),
		LPGENT("Characters (outgoing)"),
		LPGENT("Characters (all)"),
		LPGENT("Characters (in/out ratio)"),
		LPGENT("Messages (incoming)"),
		LPGENT("Messages (outgoing)"),
		LPGENT("Messages (all)"),
		LPGENT("Messages (in/out ratio)"),
		LPGENT("Chats (incoming)"),
		LPGENT("Chats (outgoing)"),
		LPGENT("Chats (all)"),
		LPGENT("Chats (in/out ratio)"),
	};

	array_each_(i, sourceTexts)
	{
		Opt.addComboItem(m_hSource, TranslateTS(sourceTexts[i]));
	}
开发者ID:kxepal,项目名称:miranda-ng,代码行数:42,代码来源:column_splittimeline.cpp

示例15: Copyright

Miranda ICQ: the free icq client for MS Windows
Copyright (C) 2000-2  Richard Hughes, Roland Rabien & Tristan Van de Vreede
*/

#include "stdafx.h"

CLIST_INTERFACE *pcli;
HINSTANCE hinstance;

HGENMENU hToggle, hEnableMenu;
BOOL gbVarsServiceExist = FALSE;
INT interval;
int hLangpack;

TCHAR* ptszDefaultMsg[] = {
	LPGENT("I am currently away. I will reply to you when I am back."),
	LPGENT("I am currently very busy and can't spare any time to talk with you. Sorry..."),
	LPGENT("I am not available right now."),
	LPGENT("I am now doing something, I will talk to you later."),
	LPGENT("I am on the phone right now. I will get back to you very soon."),
	LPGENT("I am having meal right now. I will get back to you very soon.")
};

PLUGININFOEX pluginInfoEx = {
	sizeof(PLUGININFOEX),
	__PLUGIN_NAME,
	PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
	__DESCRIPTION,
	__AUTHOR,
	__AUTHOREMAIL,
	__COPYRIGHT,
开发者ID:ybznek,项目名称:miranda-ng,代码行数:31,代码来源:Main.cpp


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