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


C++ __LOCALIZE函数代码示例

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


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

示例1: ShowStartupActions

void ShowStartupActions(COMMAND_T* _ct)
{
	WDL_FastString msg(__LOCALIZE("No project startup action is defined","sws_startup_action"));
	if (int cmdId = SNM_NamedCommandLookup(g_prjActions.Get()->Get()))
		msg.SetFormatted(512, __LOCALIZE_VERFMT("'%s' is defined as project startup action", "sws_startup_action"), kbd_getTextFromCmd(cmdId, NULL));

	char prjFn[SNM_MAX_PATH] = "";
	EnumProjects(-1, prjFn, sizeof(prjFn));
	if (*prjFn)
	{
		msg.Append("\r\n");
		msg.AppendFormatted(SNM_MAX_PATH, __LOCALIZE_VERFMT("for %s", "sws_startup_action"), prjFn);
	}
	msg.Append(".");
	msg.Append("\r\n\r\n");

	if (int cmdId = SNM_NamedCommandLookup(g_globalAction.Get()))
	{
		msg.AppendFormatted(512, __LOCALIZE_VERFMT("'%s' is defined as global startup action", "sws_startup_action"), kbd_getTextFromCmd(cmdId, NULL));
	}
	else
	{
		msg.Append(__LOCALIZE("No global startup action is defined","sws_startup_action"));
	}
	msg.Append(".");

	MessageBox(GetMainHwnd(), msg.Get(), SWS_CMD_SHORTNAME(_ct), MB_OK);
}
开发者ID:AusRedNeck,项目名称:sws,代码行数:28,代码来源:SnM_Project.cpp

示例2: DelRelatedProject

void DelRelatedProject(COMMAND_T*)
{
	if (!g_relatedProjects.Get()->GetSize())
		MessageBox(g_hwndParent, __LOCALIZE("No related projects to delete","sws_mbox"), __LOCALIZE("SWS Delete Related Project","sws_mbox"), MB_OK);
	else
		DialogBox(g_hInst, MAKEINTRESOURCE(IDD_LOAD) ,g_hwndParent, doDeleteDialog);
}
开发者ID:Breeder,项目名称:sws,代码行数:7,代码来源:ProjectMgr.cpp

示例3: SetWindowLongPtr

void FindWnd::OnInitDlg()
{
	m_resize.init_item(IDC_EDIT, 0.0, 0.0, 1.0, 0.0);
	SetWindowLongPtr(GetDlgItem(m_hwnd, IDC_EDIT), GWLP_USERDATA, 0xdeadf00b);

	// load prefs 
	m_type = GetPrivateProfileInt(FIND_INI_SEC, "Type", 0, g_SNM_IniFn.Get());
	m_zoomSrollItems = (GetPrivateProfileInt(FIND_INI_SEC, "ZoomScrollToFoundItems", 0, g_SNM_IniFn.Get()) == 1);


	LICE_CachedFont* font = SNM_GetThemeFont();

	m_vwnd_painter.SetGSC(WDL_STYLE_GetSysColor);
	m_parentVwnd.SetRealParent(m_hwnd);
	
	m_txtScope.SetID(TXTID_SCOPE);
	m_txtScope.SetFont(font);
	m_txtScope.SetText(__LOCALIZE("Find in:","sws_DLG_154"));
	m_parentVwnd.AddChild(&m_txtScope);

	m_btnEnableZommScroll.SetID(BTNID_ZOOM_SCROLL_EN);
	m_btnEnableZommScroll.SetTextLabel(__LOCALIZE("Zoom/Scroll","sws_DLG_154"), -1, font);
	m_btnEnableZommScroll.SetCheckState(m_zoomSrollItems);
	m_parentVwnd.AddChild(&m_btnEnableZommScroll);

	m_btnFind.SetID(BTNID_FIND);
	m_parentVwnd.AddChild(&m_btnFind);

	m_btnPrev.SetID(BTNID_PREV);
	m_parentVwnd.AddChild(&m_btnPrev);

	m_btnNext.SetID(BTNID_NEXT);
	m_parentVwnd.AddChild(&m_btnNext);

	m_cbType.SetID(CMBID_TYPE);
	m_cbType.SetFont(font);
	m_cbType.AddItem(__LOCALIZE("Item names","sws_DLG_154"));
	m_cbType.AddItem(__LOCALIZE("Item names (all takes)","sws_DLG_154"));
	m_cbType.AddItem(__LOCALIZE("Media filenames","sws_DLG_154"));
	m_cbType.AddItem(__LOCALIZE("Media filenames (all takes)","sws_DLG_154"));
	m_cbType.AddItem(__LOCALIZE("Item notes","sws_DLG_154"));
	m_cbType.AddItem(__LOCALIZE("Track names","sws_DLG_154"));
	m_cbType.AddItem(__LOCALIZE("Track notes","sws_DLG_154"));
	m_cbType.AddItem(__LOCALIZE("Marker/region names","sws_DLG_154"));
	m_cbType.SetCurSel(m_type);
	m_parentVwnd.AddChild(&m_cbType);

	m_txtResult.SetID(TXTID_RESULT);
	m_txtResult.SetFont(font);
	m_txtResult.SetColors(LICE_RGBA(170,0,0,255));
	m_parentVwnd.AddChild(&m_txtResult);


	g_notFound = false;
//	*g_searchStr = 0;
	SetDlgItemText(m_hwnd, IDC_EDIT, g_searchStr);

	m_parentVwnd.RequestRedraw(NULL);
}
开发者ID:AusRedNeck,项目名称:sws,代码行数:59,代码来源:SnM_Find.cpp

示例4: CreatePopupMenu

HMENU GrooveDialog::OnContextMenu(int x, int y, bool* wantDefaultItems)
{
    HMENU contextMenu = CreatePopupMenu();
    AddToMenu(contextMenu, __LOCALIZE("Select groove folder...","sws_DLG_157"), FNG_OPEN_FOLDER);
    AddToMenu(contextMenu, __LOCALIZE("Save groove...","sws_DLG_157"), NamedCommandLookup("_FNG_SAVE_GROOVE"));
    AddToMenu(contextMenu, __LOCALIZE("Refresh","sws_DLG_157"), FNG_REFRESH);
    return contextMenu;
}
开发者ID:Jeff0S,项目名称:sws,代码行数:8,代码来源:GrooveDialog.cpp

示例5: SetRMSOptions

void SetRMSOptions(COMMAND_T*)
{
	char reply[100];
	GetPrivateProfileString(SWS_INI, SWS_RMS_KEY, "-20,0.1", reply, 100, get_ini_file());
	if (GetUserInputs(__LOCALIZE("SWS RMS options","sws_analysis"), 2, __LOCALIZE("Target RMS normalize level (db),Window size for peak RMS (s)","sws_analysis"), reply, 100))
	{	// Do really basic input check
		if (strchr(reply, ',') && strlen(reply) > 2)
			WritePrivateProfileString(SWS_INI, SWS_RMS_KEY, reply, get_ini_file());
	}
}
开发者ID:AusRedNeck,项目名称:sws,代码行数:10,代码来源:Analysis.cpp

示例6: GetEnvModTypeStr

const char* GetEnvModTypeStr(EnvModType type)
{
	switch(type)
	{
		case eENVMOD_FADEIN			: return __LOCALIZE("Fade in","sws_DLG_148");	break;
		case eENVMOD_FADEOUT		: return __LOCALIZE("Fade out","sws_DLG_148");	break;
		case eENVMOD_AMPLIFY		: return __LOCALIZE("Amplify","sws_DLG_148");	break;
		default						: return NULL;									break;
	}
}
开发者ID:tweed,项目名称:sws,代码行数:10,代码来源:padreEnvelopeProcessor.cpp

示例7: ShowGroove

static void ShowGroove(int flags, void *data)
{
    GrooveTemplateHandler *me = GrooveTemplateHandler::Instance();
    if(me->isGrooveEmpty())
    {
        MessageBox(GetMainHwnd(), __LOCALIZE("No groove loaded!","sws_mbox"), __LOCALIZE("FNG - Error","sws_mbox"),0);
        return;
    }
    MessageBox(GetMainHwnd(), me->GrooveToString().c_str(), __LOCALIZE("Groove","sws_mbox"), 0);
}
开发者ID:tweed,项目名称:sws,代码行数:10,代码来源:GrooveCommands.cpp

示例8: GetEnvTypeStr

const char* GetEnvTypeStr(EnvType type)
{
	switch(type)
	{
		case eENVTYPE_TRACK			: return __LOCALIZE("Selected track envelope","sws_DLG_148");	break;
		case eENVTYPE_TAKE			: return __LOCALIZE("Selected take(s)","sws_DLG_148");			break;
		case eENVTYPE_MIDICC		: return __LOCALIZE("Selected take(s) (MIDI)","sws_DLG_148");	break;
		default						: return NULL;													break;
	}
}
开发者ID:tweed,项目名称:sws,代码行数:10,代码来源:padreEnvelopeProcessor.cpp

示例9: switch

void FindWnd::DrawControls(LICE_IBitmap* _bm, const RECT* _r, int* _tooltipHeight)
{
	// 1st row of controls
	int x0 = _r->left + SNM_GUI_X_MARGIN_OLD;
	int h = SNM_GUI_TOP_H;
	if (_tooltipHeight)
		*_tooltipHeight = h;
	bool drawLogo = false;

	if (!SNM_AutoVWndPosition(DT_LEFT, &m_txtScope, NULL, _r, &x0, _r->top, h, 5))
		return;

	if (SNM_AutoVWndPosition(DT_LEFT, &m_cbType, &m_txtScope, _r, &x0, _r->top, h))
	{
		switch (m_type)
		{
			case TYPE_ITEM_NAME:
			case TYPE_ITEM_NAME_ALL_TAKES:
			case TYPE_ITEM_FILENAME:
			case TYPE_ITEM_FILENAME_ALL_TAKES:
			case TYPE_ITEM_NOTES:
				m_btnEnableZommScroll.SetCheckState(m_zoomSrollItems);
				drawLogo = SNM_AutoVWndPosition(DT_LEFT, &m_btnEnableZommScroll, NULL, _r, &x0, _r->top, h);
				break;
			default:
				drawLogo = true;
				break;
		}
	}

	if (drawLogo)
		SNM_AddLogo(_bm, _r, x0, h);

	// 2nd row of controls
	h = 45;
	x0 = _r->left + SNM_GUI_X_MARGIN_OLD;
	int y0 = _r->top+56;

	SNM_SkinToolbarButton(&m_btnFind, __LOCALIZE("Find all","sws_DLG_154"));
	m_btnFind.SetGrayed(!g_searchStr || !(*g_searchStr) || m_type == TYPE_MARKER_REGION);
	if (SNM_AutoVWndPosition(DT_LEFT, &m_btnFind, NULL, _r, &x0, y0, h, 4))
	{
		SNM_SkinToolbarButton(&m_btnPrev, __LOCALIZE("Previous","sws_DLG_154"));
		m_btnPrev.SetGrayed(!g_searchStr || !(*g_searchStr));
		if (SNM_AutoVWndPosition(DT_LEFT, &m_btnPrev, NULL, _r, &x0, y0, h, 4))
		{
			SNM_SkinToolbarButton(&m_btnNext, __LOCALIZE("Next","sws_DLG_154"));
			m_btnNext.SetGrayed(!g_searchStr || !(*g_searchStr));
			SNM_AutoVWndPosition(DT_LEFT, &m_btnNext, NULL, _r, &x0, y0, h);
		}
	}

	m_txtResult.SetText(g_notFound ? __LOCALIZE("Not found!","sws_DLG_154") : "");
	SNM_AutoVWndPosition(DT_LEFT, &m_txtResult, NULL, _r, &x0, y0, h);
}
开发者ID:AusRedNeck,项目名称:sws,代码行数:55,代码来源:SnM_Find.cpp

示例10: GetTakeEnvelopeStr

const char* GetTakeEnvelopeStr(TakeEnvType type)
{
	switch(type)
	{
		case eTAKEENV_VOLUME	: return __LOCALIZE("Volume","sws_mbox");	break;
		case eTAKEENV_PAN		: return __LOCALIZE("Pan","sws_mbox");		break;
		case eTAKEENV_MUTE		: return __LOCALIZE("Mute","sws_mbox");		break;
		case eTAKEENV_PITCH		: return __LOCALIZE("Pitch","sws_mbox");	break;
		default					: return NULL;		break;
	}
}
开发者ID:AusRedNeck,项目名称:sws,代码行数:11,代码来源:padreUtils.cpp

示例11: __LOCALIZE

void GrooveDialog::ApplySelectedGroove()
{
    int index = (int)SendDlgItemMessage(m_hwnd, IDC_GROOVELIST, LB_GETCURSEL, 0, 0);
    std::string grooveName = __LOCALIZE("** User Groove **","sws_DLG_157");
    GrooveTemplateMemento memento = GrooveTemplateHandler::GetMemento();

    if(index > 0) {
        std::string itemLocation;
        char itemText[MAX_PATH];
        SendDlgItemMessage(m_hwnd, IDC_GROOVELIST, LB_GETTEXT, index, (LPARAM)itemText);
        grooveName = itemText;
        itemLocation = currentDir;
        itemLocation += PATH_SEP;
        itemLocation += grooveName;
        itemLocation += ".rgt";


        GrooveTemplateHandler *me = GrooveTemplateHandler::Instance();

        std::string errMessage;
        if(!me->LoadGroove(itemLocation, errMessage))
            MessageBox(GetMainHwnd(), errMessage.c_str(), __LOCALIZE("FNG - Error","sws_DLG_157"), 0);
    }
    if(index >= 0) {

        GrooveTemplateHandler *me = GrooveTemplateHandler::Instance();
        int beatDivider = me->GetGrooveTolerance();

        bool midiEditorTarget = SendDlgItemMessage(m_hwnd, IDC_TARG_NOTES, BM_GETCHECK, 0, 0) == BST_CHECKED;

        HWND editControl = GetDlgItem(m_hwnd, IDC_STRENGTH);
        char percentage[16];
        GetWindowText(editControl, percentage, 16);
        double posStrength = (double)atoi(percentage) / 100.0;
        editControl = GetDlgItem(m_hwnd, IDC_VELSTRENGTH);
        GetWindowText(editControl, percentage, 16);
        double velStrength = (double)atoi(percentage) / 100.0;
        std::string undoMessage = __LOCALIZE("FNG: load and apply groove - ","sws_DLG_157") + grooveName;

        try {
            if(midiEditorTarget)
                me->ApplyGrooveToMidiEditor(beatDivider, posStrength, velStrength);
            else
                me->ApplyGroove(beatDivider, posStrength, velStrength);
            Undo_OnStateChange2(0, undoMessage.c_str());
        } catch(RprLibException &e) {
            if(e.notify()) {
                MessageBox(GetMainHwnd(), e.what(), __LOCALIZE("FNG - Error","sws_DLG_157"), 0);
            }
        }
    }
    GrooveTemplateHandler::SetMemento(memento);
}
开发者ID:Jeff0S,项目名称:sws,代码行数:53,代码来源:GrooveDialog.cpp

示例12: GetTimeSegmentStr

const char* GetTimeSegmentStr(TimeSegment timeSegment)
{
	switch(timeSegment)
	{
		case eTIMESEGMENT_TIMESEL			: return __LOCALIZE("Time selection","sws_mbox");	break;
		case eTIMESEGMENT_PROJECT			: return __LOCALIZE("Project","sws_mbox");			break;
		case eTIMESEGMENT_SELITEM			: return __LOCALIZE("Selected item","sws_mbox");	break;
		case eTIMESEGMENT_LOOP				: return __LOCALIZE("Loop","sws_mbox");				break;
		//case eTIMESEGMENT_CURRENTMEASURE	: return __LOCALIZE("Current measure","sws_mbox");	break;
		default								: return "???";										break;
	}
}
开发者ID:AusRedNeck,项目名称:sws,代码行数:12,代码来源:padreUtils.cpp

示例13: OpenProjectsFromList

void OpenProjectsFromList(COMMAND_T*)
{
	char cPath[256];
	GetProjectPath(cPath, 256);
	char* filename = BrowseForFiles(__LOCALIZE("Select project list","sws_mbox"), cPath, NULL, false, "Reaper Project List (*.RPL)\0*.RPL\0All Files\0*.*\0");
	if (filename)
	{
		FILE* f = fopenUTF8(filename, "r");
		if (f)
		{
			// Save "prompt on new project" variable
			int iNewProjOpts;
			int sztmp;
			int* pNewProjOpts = (int*)get_config_var("newprojdo", &sztmp);
			iNewProjOpts = *pNewProjOpts;
			*pNewProjOpts = 0;
			int i = 0;

			int iProjects = -1;
			while (EnumProjects(++iProjects, NULL, 0)); // Count projects
			char cName[10];
			EnumProjects(-1, cName, 10);

			if (iProjects != 1 || cName[0] != 0 || GetNumTracks() != 0)
			{
				if (MessageBox(g_hwndParent, __LOCALIZE("Close active tabs first?","sws_mbox"), __LOCALIZE("SWS Project List Open","sws_mbox"), MB_YESNO) == IDYES)
					Main_OnCommand(40886, 0);
				else
					i = 1;
			}

			while(fgets(cPath, 256, f))
			{
				char* pC;
				while((pC = strchr(cPath, '\r'))) *pC = 0; // Strip newlines no matter the format
				while((pC = strchr(cPath, '\n'))) *pC = 0;
				if (cPath[0])
				{
					if (i++)
						Main_OnCommand(41929, 0); // New project tab (ignore default template)
					Main_openProject(cPath);
				}
			}
			fclose(f);

			*pNewProjOpts = iNewProjOpts;
		}
		else
			MessageBox(g_hwndParent, __LOCALIZE("Unable to open file.","sws_mbox"), __LOCALIZE("SWS Project List Open","sws_mbox"), MB_OK);

		free(filename);
	}
}
开发者ID:Breeder,项目名称:sws,代码行数:53,代码来源:ProjectMgr.cpp

示例14: GetEmulationSettings

static void GetEmulationSettings(int flag, void *data)
{
    char returnStrings[512] = "1,1";
    std::string delay = getReaperProperty("midihw_delay");
    std::string jitter = getReaperProperty("midihw_jitter");
    if(!delay.empty() && !jitter.empty()) {
        std::string temp = delay + "," + jitter;
        ::strcpy(returnStrings, temp.c_str());
    }
    if(GetUserInputs(__LOCALIZE("MIDI hardware emulation","sws_mbox"), 2, __LOCALIZE("Serial delay (ms),Max jitter (ms)","sws_mbox"), returnStrings, 512)) {
        std::string results(returnStrings);
        setReaperProperty("midihw_delay", results.substr(0, results.find_first_of(',')));
        setReaperProperty("midihw_jitter", results.substr(results.find_first_of(',') + 1));
    }
}
开发者ID:wolqws,项目名称:sws,代码行数:15,代码来源:MiscCommands.cpp

示例15: SetProjectStartupAction

void SetProjectStartupAction(COMMAND_T* _ct)
{
	if (PromptClearProjectStartupAction(false) == IDNO)
		return;

	char idstr[SNM_MAX_ACTION_CUSTID_LEN];
	lstrcpyn(idstr, __LOCALIZE("Paste command ID or identifier string here","sws_mbox"), sizeof(idstr));
	if (PromptUserForString(GetMainHwnd(), SWS_CMD_SHORTNAME(_ct), idstr, sizeof(idstr), true))
	{
		WDL_FastString msg;
		if (int cmdId = SNM_NamedCommandLookup(idstr))
		{
			// more checks: http://forum.cockos.com/showpost.php?p=1252206&postcount=1618
			if (int tstNum = CheckSwsMacroScriptNumCustomId(idstr))
			{
				msg.SetFormatted(256, __LOCALIZE_VERFMT("%s failed: unreliable command ID '%s'!","sws_DLG_161"), SWS_CMD_SHORTNAME(_ct), idstr);
				msg.Append("\n");

				// localization note: msgs shared with the CA editor
				if (tstNum==-1)
					msg.Append(__LOCALIZE("For SWS/S&M actions, you must use identifier strings (e.g. _SWS_ABOUT), not command IDs (e.g. 47145).\nTip: to copy such identifiers, right-click the action in the Actions window > Copy selected action cmdID/identifier string.","sws_mbox"));
				else if (tstNum==-2)
					msg.Append(__LOCALIZE("For macros/scripts, you must use identifier strings (e.g. _f506bc780a0ab34b8fdedb67ed5d3649), not command IDs (e.g. 47145).\nTip: to copy such identifiers, right-click the macro/script in the Actions window > Copy selected action cmdID/identifier string.","sws_mbox"));
				MessageBox(GetMainHwnd(), msg.Get(), __LOCALIZE("S&M - Error","sws_DLG_161"), MB_OK);
			}
			else
			{
				g_prjActions.Get()->Set(idstr);
				Undo_OnStateChangeEx2(NULL, SWS_CMD_SHORTNAME(_ct), UNDO_STATE_MISCCFG, -1);

				msg.SetFormatted(256, __LOCALIZE_VERFMT("'%s' is defined as project startup action","sws_mbox"), kbd_getTextFromCmd(cmdId, NULL));
				char prjFn[SNM_MAX_PATH] = "";
				EnumProjects(-1, prjFn, sizeof(prjFn));
				if (*prjFn) {
					msg.Append("\n");
					msg.AppendFormatted(SNM_MAX_PATH, __LOCALIZE_VERFMT("for %s","sws_mbox"), prjFn);
				}
				msg.Append(".");
				MessageBox(GetMainHwnd(), msg.Get(), SWS_CMD_SHORTNAME(_ct), MB_OK);
			}
		}
		else
		{
			msg.SetFormatted(256, __LOCALIZE_VERFMT("%s failed: command ID or identifier string '%s' not found in the 'Main' section of the action list!","sws_DLG_161"), SWS_CMD_SHORTNAME(_ct), idstr);
			MessageBox(GetMainHwnd(), msg.Get(), __LOCALIZE("S&M - Error","sws_DLG_161"), MB_OK);
		}
	}
}
开发者ID:tweed,项目名称:sws,代码行数:48,代码来源:SnM_Project.cpp


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