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


C++ LoadStr函数代码示例

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


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

示例1: TCopyParamType

//---------------------------------------------------------------------------
void __fastcall TGUIConfiguration::DefaultLocalized()
{
  if (FCopyParamListDefaults)
  {
    FCopyParamList->Clear();

    // guard against "empty resource string" from obsolete traslations
    // (DefaultLocalized is called for the first time before detection of
    // obsolete translations)
    if (!LoadStr(COPY_PARAM_PRESET_ASCII).IsEmpty())
    {
      TCopyParamType * CopyParam;

      CopyParam = new TCopyParamType(FDefaultCopyParam);
      CopyParam->TransferMode = tmAscii;
      FCopyParamList->Add(LoadStr(COPY_PARAM_PRESET_ASCII), CopyParam, NULL);

      CopyParam = new TCopyParamType(FDefaultCopyParam);
      CopyParam->TransferMode = tmBinary;
      FCopyParamList->Add(LoadStr(COPY_PARAM_PRESET_BINARY), CopyParam, NULL);

      CopyParam = new TCopyParamType(FDefaultCopyParam);
      CopyParam->NewerOnly = true;
      FCopyParamList->Add(LoadStr(COPY_PARAM_NEWER_ONLY), CopyParam, NULL);
    }

    FCopyParamList->Reset();
  }
}
开发者ID:seebigsea,项目名称:winscp,代码行数:30,代码来源:GUIConfiguration.cpp

示例2: LoadStr

void __fastcall TIBEAEventsEditor::FormCreate(TObject *Sender)
{
  for(int i=1; i < MaxEvents; i++ ) 
      cEvents->Cells[0][i-1] = System::String(i);
  RequestedEvents->Caption = LoadStr(57810);
  bOK->Caption = LoadStr(57811);
  bCancel->Caption = LoadStr(57812);
}
开发者ID:SkylineNando,项目名称:Delphi,代码行数:8,代码来源:ibevnts.cpp

示例3: WriteToLog

void WriteToLog(String S) {
	HANDLE LogFile;
	String LogPath;
	String LogFileName;
	DWORD dwSize;
	AnsiString SS;
	TDateTime DateTime;
	LPDWORD NumberOfBytesWritten = new DWORD;

	try { // except
		DateTime = Now();

		LogPath = ExtractFilePath(Application->ExeName) + LoadStr(IDS_LOG_PATH);
		if (!DirectoryExists(LogPath))
			CreateDir(LogPath);

		LogFileName = IncludeTrailingPathDelimiter(LogPath) +
			ChangeFileExt(ExtractFileName(Application->ExeName),
			LoadStr(IDS_LOG_EXT));

		LogFile = CreateFile(LogFileName.w_str(), GENERIC_READ, FILE_SHARE_READ,
			NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);

		dwSize = 0;
		if (LogFile != INVALID_HANDLE_VALUE) {
			dwSize = GetFileSize(LogFile, NULL);
			CloseHandle(LogFile);
		}

		if (dwSize > MaxLogSize) {
			String NewFileName = IncludeTrailingPathDelimiter(LogPath) +
				OnlyFileName(Application->ExeName) + SPACE + FormatDateTime
				(LoadStr(IDS_DATETIME_FORMAT_FILENAME), DateTime) +
				LoadStr(IDS_LOG_EXT);
			MoveFile(LogFileName.w_str(), NewFileName.w_str());
		}

		LogFile = CreateFile(LogFileName.w_str(), GENERIC_WRITE,
			FILE_SHARE_READ, NULL, OPEN_ALWAYS,
			FILE_ATTRIBUTE_NORMAL | FILE_ATTRIBUTE_COMPRESSED, 0);

		if (LogFile != INVALID_HANDLE_VALUE) {
			SS = AnsiString(FormatDateTime(LoadStr(IDS_DATETIME_FORMAT_LOG),
				DateTime) + "; " + AnsiReplaceStr(S, sLineBreak, SPACE) +
				sLineBreak);

			if (SetFilePointer(LogFile, 0, NULL,
				FILE_END) != INVALID_SET_FILE_POINTER)
				WriteFile(LogFile, SS.c_str(), SS.Length(),
				NumberOfBytesWritten, NULL);

			CloseHandle(LogFile);
		}
	}
	catch (...) {
	}
}
开发者ID:P3tr0viCh,项目名称:UtilsAndComps,代码行数:57,代码来源:UtilsLog.cpp

示例4: TForm

//---------------------------------------------------------------------------
__fastcall TSelectMaskDialog::TSelectMaskDialog(TComponent* Owner)
        : TForm(Owner)
{
  DefaultFileFilter(FFileFilter);
  SetFileFilter(FFileFilter);
  UseSystemSettings(this);
  HintLabel(HintText,
    FORMAT(L"%s\n \n%s\n \n%s\n \n%s", (LoadStr(MASK_HINT2), LoadStr(FILE_MASK_EX_HINT),
      LoadStr(COMBINING_MASKS_HINT), LoadStr(MASK_HELP))));
}
开发者ID:elazzi,项目名称:winscp,代码行数:11,代码来源:SelectMask.cpp

示例5: TCustomDialog

//---------------------------------------------------------------------
__fastcall TBookmarkFolderDialog::TBookmarkFolderDialog(TStrings * Folders) :
  TCustomDialog(HELP_LOCATION_PROFILE_MOVE)
{
  Caption = LoadStr(MOVE_BOOKMARK_CAPTION);

  NameCombo = new TComboBox(this);
  NameCombo->AutoComplete = false;
  AddComboBox(NameCombo, CreateLabel(LoadStr(MOVE_BOOKMARK_PROMPT)));
  NameCombo->Items = Folders;
}
开发者ID:elazzi,项目名称:winscp,代码行数:11,代码来源:LocationProfiles.cpp

示例6: Guard

UnicodeString TConfiguration::GetVersionStr() const
{
  UnicodeString Result;
  TGuard Guard(FCriticalSection);
  try
  {
    TVSFixedFileInfo * Info = GetFixedApplicationInfo();
    /*return FMTLOAD(VERSION,
      HIWORD(Info->dwFileVersionMS),
      LOWORD(Info->dwFileVersionMS),
      HIWORD(Info->dwFileVersionLS),
      LOWORD(Info->dwFileVersionLS));*/
    UnicodeString BuildStr;
    if (!GetIsUnofficial())
    {
      BuildStr = LoadStr(VERSION_BUILD);
    }
    else
    {
      #ifdef _DEBUG
      BuildStr = LoadStr(VERSION_DEBUG_BUILD);
      #else
      BuildStr = LoadStr(VERSION_DEV_BUILD);
      #endif
    }

    int Build = LOWORD(Info->dwFileVersionLS);
    if (Build > 0)
    {
      BuildStr += L" " + ::IntToStr(Build);
    }

//    #ifndef BUILD_OFFICIAL
//    UnicodeString BuildDate = __DATE__;
//    UnicodeString MonthStr = CutToChar(BuildDate, L' ', true);
//    int Month = ParseShortEngMonthName(MonthStr);
//    int Day = StrToInt64(CutToChar(BuildDate, L' ', true));
//    int Year = StrToInt64(Trim(BuildDate));
//    UnicodeString DateStr = FORMAT("%d-%2.2d-%2.2d", Year, Month, Day);
//    AddToList(BuildStr, DateStr, L" ");
//    #endif

    Result = FMTLOAD(VERSION2, GetVersion().c_str(), Build);

//    #ifndef BUILD_OFFICIAL
//    Result += L" " + LoadStr(VERSION_DONT_DISTRIBUTE);
//    #endif
  }
  catch (Exception & E)
  {
    throw ExtException(&E, "Can't get application version");
  }
  return Result;
}
开发者ID:kocicjelena,项目名称:Far-NetBox,代码行数:54,代码来源:Configuration.cpp

示例7: isModified

static int isModified(void)
{
	char cfg[128];
	char tmpstring[128];
	char wifiippass[128];
	//int idx=0;
	int changeflag = 0;


	memset(cfg, 0x00, sizeof(cfg));
	memset(tmpstring, 0, sizeof(tmpstring));
	LoadStr("SSID", cfg);
	GetWindowText(WifiWnd[0], tmpstring, sizeof(tmpstring));
	if(strncmp(cfg, tmpstring, sizeof(tmpstring))!=0) {
		changeflag = 1;
	}

	memset(tmpstring, 0, sizeof(tmpstring));
	if(SendMessage(WifiWnd[2], CB_GETCURSEL, 0, 0)!=gOptions.wifidhcpfunon) {
		changeflag = 1;
	}

	if(get_new_ip() ==0) {
		return 0;
	}
	
	if(strncmp(oldip[0], newip[0], sizeof(newip[0]))!=0){
		changeflag = 1;
	}

	if(strncmp(oldip[1], newip[1], sizeof(newip[1]))!=0) {
		changeflag = 1;
	}

	if(strncmp(oldip[2], newip[2], sizeof(newip[2]))!=0) {
		changeflag = 1;
	}

	memset(tmpstring, 0, sizeof(tmpstring));
	memset(wifiippass, 0, sizeof(wifiippass));
	LoadStr("wifipasswd", wifiippass);
	GetWindowText(WifiWnd[1], tmpstring, sizeof(tmpstring));
	if(strncmp(wifiippass, tmpstring, strlen(tmpstring)) != 0) {
		changeflag = 1;
	}

	return changeflag;
}
开发者ID:colin-dvlp,项目名称:chinamobile,代码行数:48,代码来源:ssrnewwifisetting.c

示例8: TForm

//---------------------------------------------------------------------------
__fastcall TRemoteTransferDialog::TRemoteTransferDialog(TComponent * Owner)
  : TForm(Owner)
{
  UseSystemSettings(this);

  Caption = LoadStr(REMOTE_COPY_TITLE);
}
开发者ID:elazzi,项目名称:winscp,代码行数:8,代码来源:RemoteTransfer.cpp

示例9: AppendExceptionStackTraceAndForget

//---------------------------------------------------------------------------
bool __fastcall AppendExceptionStackTraceAndForget(TStrings *& MoreMessages)
{
  bool Result = false;

  TGuard Guard(StackTraceCriticalSection.get());

  TStackTraceMap::iterator Iterator = StackTraceMap.find(GetCurrentThreadId());
  if (Iterator != StackTraceMap.end())
  {
    std::unique_ptr<TStrings> OwnedMoreMessages;
    if (MoreMessages == NULL)
    {
      OwnedMoreMessages.reset(new TStringList());
      MoreMessages = OwnedMoreMessages.get();
      Result = true;
    }
    if (!MoreMessages->Text.IsEmpty())
    {
      MoreMessages->Text = MoreMessages->Text + "\n";
    }
    MoreMessages->Text = MoreMessages->Text + LoadStr(STACK_TRACE) + "\n";
    MoreMessages->AddStrings(Iterator->second);

    delete Iterator->second;
    StackTraceMap.erase(Iterator);

    OwnedMoreMessages.release();
  }
  return Result;
}
开发者ID:mpmartin8080,项目名称:winscp,代码行数:31,代码来源:WinInterface.cpp

示例10: LoadStr

String __fastcall TPieEditor::GetVerb(Integer Index)
{
  if (Index == 0)
	 return LoadStr(EditAngle_RC);
  else
    return String("");
}
开发者ID:SkylineNando,项目名称:Delphi,代码行数:7,代码来源:piereg.cpp

示例11: DebugAssert

void TSessionLog::Add(TLogLineType Type, UnicodeString ALine)
{
  DebugAssert(FConfiguration);
  if (GetLogging())
  {
    try
    {
      if (FParent != nullptr)
      {
        DoAdd(Type, ALine, nb::bind(&TSessionLog::DoAddToParent, this));
      }
      else
      {
        TGuard Guard(FCriticalSection);

        DoAdd(Type, ALine, nb::bind(&TSessionLog::DoAddToSelf, this));
      }
    }
    catch (Exception &E)
    {
      // We failed logging, turn it off and notify user.
      FConfiguration->SetLogging(false);
      try
      {
        throw ExtException(&E, LoadStr(LOG_GEN_ERROR));
      }
      catch (Exception &E2)
      {
        AddException(&E2);
        FUI->HandleExtendedException(&E2);
      }
    }
  }
}
开发者ID:michaellukashov,项目名称:Far-NetBox,代码行数:34,代码来源:SessionInfo.cpp

示例12: FatalExceptionMessageDialog

//---------------------------------------------------------------------------
unsigned int __fastcall FatalExceptionMessageDialog(Exception * E, TQueryType Type,
  int SessionReopenTimeout, const UnicodeString MessageFormat, unsigned int Answers,
  UnicodeString HelpKeyword, const TMessageParams * Params)
{
  assert(FLAGCLEAR(Answers, qaRetry));
  Answers |= qaRetry;

  TQueryButtonAlias Aliases[1];
  Aliases[0].Button = qaRetry;
  Aliases[0].Alias = LoadStr(RECONNECT_BUTTON);

  TMessageParams AParams;
  if (Params != NULL)
  {
    AParams = *Params;
  }
  assert(AParams.Timeout == 0);
  // the condition is de facto excess
  if (SessionReopenTimeout > 0)
  {
    AParams.Timeout = SessionReopenTimeout;
    AParams.TimeoutAnswer = qaRetry;
  }
  assert(AParams.Aliases == NULL);
  AParams.Aliases = Aliases;
  AParams.AliasesCount = LENOF(Aliases);

  return ExceptionMessageDialog(E, Type, MessageFormat, Answers, HelpKeyword, &AParams);
}
开发者ID:mpmartin8080,项目名称:winscp,代码行数:30,代码来源:WinInterface.cpp

示例13: OnOK

void CDelPipesDialog::OnOK()
{
	// TODO: добавьте специализированный код или вызов базового класса

	CDialog::OnOK();
	CString str;
	str.Format(LoadStr(IDS_DEL_PIPES_Q), m_listbox.GetSelCount());
	if (AfxMessageBox(str, MB_YESNO) == IDYES)
	{
		m_pDoc->vecSel.clear();
		for (int i = 0; i < m_listbox.GetCount(); i++)
			if (m_listbox.GetSel(i))
			{
				DWORD_PTR dw = m_listbox.GetItemData(i);
				int NAYZ = LOWORD(dw), KOYZ = HIWORD(dw);
				m_pDoc->vecSel.insert(SelStr(NAYZ, KOYZ));
			}
		if (!m_pDoc->IsSelConnected())
		{
			AfxMessageBox(IDS_PARTS_NOT_CONNECTED, MB_OK | MB_ICONEXCLAMATION);
			return;
		}
		m_pDoc->DeleteSelected();
	}
}
开发者ID:tchv71,项目名称:StartPP,代码行数:25,代码来源:DelPipesDialog.cpp

示例14: EvCreate

/*
	Window 生成時の CallBack
*/
BOOL TSetupDlg::EvCreate(LPARAM lParam)
{
	setup_list.AttachWnd(GetDlgItem(SETUP_LIST));

	for (int i=0; i < MAX_SETUP_SHEET; i++) {
		sheet[i].Create(SETUP_SHEET1 + i, cfg, this);
		setup_list.SendMessage(LB_ADDSTRING, 0, (LPARAM)LoadStr(IDS_SETUP_SHEET1 + i));
	}
	SetSheet();

	if (rect.left == CW_USEDEFAULT)
	{
		GetWindowRect(&rect);
		int xsize = rect.right - rect.left, ysize = rect.bottom - rect.top;
		int	cx = ::GetSystemMetrics(SM_CXFULLSCREEN), cy = ::GetSystemMetrics(SM_CYFULLSCREEN);
		int	x = (cx - xsize)/2;
		int y = (cy - ysize)/2;

		MoveWindow((x < 0) ? 0 : x % (cx - xsize), (y < 0) ? 0 : y % (cy - ysize),
			xsize, ysize, FALSE);
	}
	else
		MoveWindow(rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, FALSE);

	return	TRUE;
}
开发者ID:cmheia,项目名称:FastCopy-M,代码行数:29,代码来源:setupdlg.cpp

示例15: ClearHistory

//---------------------------------------------------------------------------
void __fastcall TCustomWinConfiguration::DefaultHistory()
{
  ClearHistory();

  std::unique_ptr<THistoryStrings> Strings;

  // Defaults for speed limits.
  Strings.reset(new THistoryStrings());
  // This is language-specifics, what has to be dealt with when changing language.
  // There's ad-hoc workaround in CopySpeedLimits.
  // If we need to solve this for another history, we should introduce
  // a generic solution, like language-specific history ("SpeedLimitEN")
  Strings->Add(LoadStr(SPEED_UNLIMITED));
  unsigned long Speed = 8192;
  while (Speed >= 8)
  {
    Strings->Add(IntToStr(int(Speed)));
    Speed = Speed / 2;
  }
  FHistory->AddObject(L"SpeedLimit", Strings.release());

  Strings.reset(new THistoryStrings());
  Strings->Add(FormatCommand(DefaultPuttyPath, L""));
  Strings->Add(FormatCommand(DefaultPuttyPath, L"-t -m \"%TEMP%\\putty.txt\" !`cmd.exe /c echo cd '!/' ; /bin/bash -login > \"%TEMP%\\putty.txt\"`"));
  Strings->Add(KittyExecutable);
  Strings->Add(FORMAT(L"%s -cmd \"cd '!/'\" [email protected][email protected] -P !# -title \"!N\"", (KittyExecutable)));
  FHistory->AddObject(L"PuttyPath", Strings.release());
}
开发者ID:anyue100,项目名称:winscp,代码行数:29,代码来源:CustomWinConfiguration.cpp


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