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

C++ FormatString函数代码示例

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

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



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

示例1: DepthWriteMaskFromString

	DEPTH_WRITE_MASK DepthWriteMaskFromString(const char* str)
	{
		if (!str)
			return DEPTH_WRITE_MASK_ALL;
		if (_stricmp(str, "DEPTH_WRITE_MASK_ZERO") == 0)
		{
			return DEPTH_WRITE_MASK_ZERO;
		}

		if (_stricmp(str, "DEPTH_WRITE_MASK_ALL") == 0)
		{
			return DEPTH_WRITE_MASK_ALL;
		}

		Logger::Log(FB_ERROR_LOG_ARG, FormatString("%s is not valid DepthWriteMask", str).c_str());
		return DEPTH_WRITE_MASK_ALL;
	}
开发者ID:fastbird,项目名称:fastbirdEngine,代码行数:17,代码来源:RendererEnums.cpp


示例2: FormatString

void T3DObjectClock::render_exec_calendar(Trendercontext *rc, TSC_time &disptime, double size)
{
	try{
		QString content,monthstring;

		monthnames->get(disptime.G_month()-1)->tostring(monthstring,0);

		FormatString(content,_qstr("^1 "),disptime.G_day());
		content+=_TRL(monthstring);

		render_exec_string(rc,content);
	}
	catch(QError &)
	{
		throw QError(_text("Error while constructing calendar info"));
	}
}
开发者ID:pvaut,项目名称:Z-Flux,代码行数:17,代码来源:3dclock.cpp


示例3: python_call_function

int python_call_function(void)
{
    if( !python_is_initialised_check() )
        return 0;

    if( check_args( 1, 1+EmacsPythonCallCommand::MAX_ARGS ) )
        return 0;

    EmacsPythonCallCommand py_command;
    if( !string_arg( 1 ) )
        return 0;

    py_command.python_function = ml_value.asString();

    const int first_arg = 2;
    py_command.num_args = cur_exec->p_nargs - 1;
    for( int arg=first_arg; !ml_err && arg<=cur_exec->p_nargs; arg++ )
    {
        if( !eval_arg( arg ) )
            return 0;

        switch( ml_value.exp_type() )
        {
        case ISINTEGER:
        case ISSTRING:
            py_command.python_args[ arg - first_arg ] = ml_value;
            break;

        case ISVOID:
        case ISMARKER:
        case ISWINDOWS:
        case ISARRAY:
            error( FormatString("Python-call - unsupported expression type for arg %d") << arg );
            return 0;
        }
    }

    py_command.executeCommand();

    if( py_command.failed() )
        error( py_command.failureReason() );
    else
        ml_value = py_command.getResult();

    return 0;
}
开发者ID:barry-scott,项目名称:BarrysEmacs,代码行数:46,代码来源:emacs_python_interface.cpp


示例4: output

static void output(bool traceInDebugOnly, DebugTraceOutputType outputType, const char *format, va_list vararg)
{
#if defined(ANGLE_ENABLE_DEBUG_ANNOTATIONS)
    static std::vector<char> buffer(512);

    if (perfActive())
    {
        size_t len = FormatStringIntoVector(format, vararg, buffer);
        std::wstring formattedWideMessage(buffer.begin(), buffer.begin() + len);

        switch (outputType)
        {
            case DebugTraceOutputTypeNone:
                break;
            case DebugTraceOutputTypeBeginEvent:
                g_DebugAnnotationWrapper->beginEvent(formattedWideMessage);
                break;
            case DebugTraceOutputTypeSetMarker:
                g_DebugAnnotationWrapper->setMarker(formattedWideMessage);
                break;
        }
    }
#endif // ANGLE_ENABLE_DEBUG_ANNOTATIONS

#if defined(ANGLE_ENABLE_DEBUG_TRACE)
#if defined(NDEBUG)
    if (traceInDebugOnly)
    {
        return;
    }
#endif // NDEBUG
    std::string formattedMessage = FormatString(format, vararg);

    static std::ofstream file(TRACE_OUTPUT_FILE, std::ofstream::app);
    if (file)
    {
        file.write(formattedMessage.c_str(), formattedMessage.length());
        file.flush();
    }

#if defined(ANGLE_ENABLE_DEBUG_TRACE_TO_DEBUGGER)
    OutputDebugStringA(formattedMessage.c_str());
#endif // ANGLE_ENABLE_DEBUG_TRACE_TO_DEBUGGER

#endif // ANGLE_ENABLE_DEBUG_TRACE
}
开发者ID:AOSC-Dev,项目名称:Pale-Moon,代码行数:46,代码来源:debug.cpp


示例5: Lock

bool C4Network2IRCClient::OnConn(const C4NetIO::addr_t &AddrPeer, const C4NetIO::addr_t &AddrConnect, const addr_t *pOwnAddr, C4NetIO *pNetIO)
	{
	// Security checks
	if(!fConnecting || fConnected || !AddrEqual(AddrConnect, ServerAddr)) return false;
	CStdLock Lock(&CSec);
	// Save connection data
	fConnected = true;
	fConnecting = false;
	C4Network2IRCClient::PeerAddr = AddrPeer;
	// Send welcome message
	if(!Password.isNull())
		Send("PASS", Password.getData());
	Send("NICK", Nick.getData());
	Send("USER", FormatString("clonk x x :%s", RealName.getData()).getData());
	// Okay
	return true;
	}
开发者ID:Marko10-000,项目名称:clonk-rage,代码行数:17,代码来源:C4Network2IRC.cpp


示例6: GetCallbackScript

C4Value C4Effect::DoCall(C4PropList *pObj, const char *szFn, const C4Value &rVal1, const C4Value &rVal2, const C4Value &rVal3, const C4Value &rVal4, const C4Value &rVal5, const C4Value &rVal6, const C4Value &rVal7)
{
	C4PropList * p = GetCallbackScript();
	if (!p)
	{
		C4AulFunc * fn = GetFunc(szFn);
		if (fn) return fn->Exec(this, &C4AulParSet(rVal1, rVal2, rVal3, rVal4, rVal5, rVal6, rVal7));
	}
	else
	{
		// old variant
		// compose function name
		C4AulFunc * fn = p->GetFunc(FormatString(PSF_FxCustom, GetName(), szFn).getData());
		if (fn) return fn->Exec(p, &C4AulParSet(Obj(pObj), this, rVal1, rVal2, rVal3, rVal4, rVal5, rVal6, rVal7));
	}
	return C4Value();
}
开发者ID:TheBlackJokerDevil,项目名称:openclonk,代码行数:17,代码来源:C4Effect.cpp


示例7: catch

void CapturedAPICalls::PlayOverride(CaptureOverride* pCO)
{
    unsigned int i = 0;

    try
    {
        for (CaptureList::iterator iter = m_captureList.begin(); iter != m_captureList.end(); ++iter)
        {
            (*iter)->PlayOverride(pCO);
            ++i;
        }
    }
    catch (...)
    {
        OSWrappers::MessageBox(FormatString("Exception on %i", i).c_str(), (const char*)"exception!", 0);
    }
}
开发者ID:PlusChie,项目名称:CodeXL,代码行数:17,代码来源:CaptureStream.cpp


示例8: C4ControlScript

C4GUI::Edit::InputResult C4ChatInputDialog::OnChatInput(C4GUI::Edit *edt,
                                                        bool fPasting,
                                                        bool fPastingMore) {
  // no double processing
  if (fProcessed) return C4GUI::Edit::IR_CloseDlg;
  // get edit text
  C4GUI::Edit *pEdt = reinterpret_cast<C4GUI::Edit *>(edt);
  char *szInputText = const_cast<char *>(pEdt->GetText());
  // Store to back buffer
  Game.MessageInput.StoreBackBuffer(szInputText);
  // script queried input?
  if (fObjInput) {
    fProcessed = true;
    // check if the target input is still valid
    C4Player *pPlr = Game.Players.Get(iPlr);
    if (!pPlr) return C4GUI::Edit::IR_CloseDlg;
    if (!pPlr->MarkMessageBoardQueryAnswered(pTarget)) {
      // there was no associated query!
      return C4GUI::Edit::IR_CloseDlg;
    }
    // then do a script callback, incorporating the input into the answer
    if (fUppercase) SCapitalize(szInputText);
    StdStrBuf sInput;
    sInput.Copy(szInputText);
    sInput.EscapeString();
    Game.Control.DoInput(
        CID_Script,
        new C4ControlScript(
            FormatString("OnMessageBoardAnswer(Object(%d), %d, \"%s\")",
                         pTarget ? pTarget->Number : 0, iPlr,
                         sInput.getData()).getData()),
        CDT_Decide);
    return C4GUI::Edit::IR_CloseDlg;
  } else
    // reroute to message input class
    Game.MessageInput.ProcessInput(szInputText);
  // safety: message board commands may do strange things
  if (!C4GUI::IsGUIValid() || this != pInstance) return C4GUI::Edit::IR_Abort;
  // select all text to be removed with next keypress
  // just for pasting mode; usually the dlg will be closed now anyway
  pEdt->SelectAll();
  // avoid dlg close, if more content is to be pasted
  if (fPastingMore) return C4GUI::Edit::IR_None;
  fProcessed = true;
  return C4GUI::Edit::IR_CloseDlg;
}
开发者ID:ev1313,项目名称:yaC,代码行数:46,代码来源:C4MessageInput.cpp


示例9: registrateMethods

GraphicEngine::GraphicEngine(Game *game)
{
	this->game = game;
	needSaveScreenShot = false;
	renderWhireFrame = false;	  
	registrateMethods("game");
	blockDebugTexts = false;
	lightingEnabled = true;
	renderFilter = new PlatformerRenderFilter(CVector(500, 400));

#ifndef IPHONE_OS
	GLenum err = glewInit();
	if (GLEW_OK != err) {
	  Log::error(FormatString("Error: %s\n", glewGetErrorString(err)));
	}
#endif
}
开发者ID:muhaos,项目名称:MHEngine,代码行数:17,代码来源:GraphicEngine.cpp


示例10: C4FileSelDlg

C4PortraitSelDlg::C4PortraitSelDlg(C4FileSel_BaseCB *pSelCallback,
                                   bool fSetPicture, bool fSetBigIcon)
    : C4FileSelDlg(Config.General.ExePath,
                   FormatString(LoadResStr("IDS_MSG_SELECT"),
                                LoadResStr("IDS_TYPE_PORTRAIT")).getData(),
                   pSelCallback, false),
      pCheckSetPicture(NULL),
      pCheckSetBigIcon(NULL),
      fDefSetPicture(fSetPicture),
      fDefSetBigIcon(fSetBigIcon) {
  char path[_MAX_PATH + 1];
  // add common picture locations
  StdStrBuf strLocation;
  SCopy(Config.AtUserPath(""), path, _MAX_PATH);
  TruncateBackslash(path);
  strLocation.Format("%s %s", C4ENGINECAPTION, LoadResStr("IDS_TEXT_USERPATH"));
  AddLocation(strLocation.getData(), path);
  SCopy(Config.AtExePath(""), path, _MAX_PATH);
  TruncateBackslash(path);
  strLocation.Format("%s %s", C4ENGINECAPTION,
                     LoadResStr("IDS_TEXT_PROGRAMDIRECTORY"));
  AddCheckedLocation(strLocation.getData(), Config.General.ExePath);
#ifdef _WIN32
  if (SHGetSpecialFolderPath(NULL, path, CSIDL_PERSONAL, FALSE))
    AddCheckedLocation(LoadResStr("IDS_TEXT_MYDOCUMENTS"), path);
  if (SHGetSpecialFolderPath(NULL, path, CSIDL_MYPICTURES, FALSE))
    AddCheckedLocation(LoadResStr("IDS_TEXT_MYPICTURES"), path);
  if (SHGetSpecialFolderPath(NULL, path, CSIDL_DESKTOPDIRECTORY, FALSE))
    AddCheckedLocation(LoadResStr("IDS_TEXT_DESKTOP"), path);
#endif
#ifdef __APPLE__
  AddCheckedLocation(LoadResStr("IDS_TEXT_HOME"), getenv("HOME"));
#else
  AddCheckedLocation(LoadResStr("IDS_TEXT_HOMEFOLDER"), getenv("HOME"));
#endif
#ifndef _WIN32
  sprintf(path, "%s%c%s", getenv("HOME"), (char)DirectorySeparator,
          (const char *)"Desktop");
  AddCheckedLocation(LoadResStr("IDS_TEXT_DESKTOP"), path);
#endif
  // build dialog
  InitElements();
  // select last location
  SetCurrentLocation(Config.Startup.LastPortraitFolderIdx, false);
}
开发者ID:ev1313,项目名称:yaC,代码行数:45,代码来源:C4FileSelDlg.cpp


示例11: FileExists

bool C4Shader::Refresh(const char *szWhat, const char **szUniforms)
{
	// Find a slice where the source file has updated
	ShaderSliceList::iterator pSlice;
	for (pSlice = FragmentSlices.begin(); pSlice != FragmentSlices.end(); pSlice++)
		if (pSlice->Source.getLength() &&
			FileExists(pSlice->Source.getData()) &&
			FileTime(pSlice->Source.getData()) > pSlice->SourceTime)
			break;
	if (pSlice == FragmentSlices.end()) return true;
	StdCopyStrBuf Source = pSlice->Source;

	// Okay, remove all slices that came from this file
	ShaderSliceList::iterator pNext;
	for (; pSlice != FragmentSlices.end(); pSlice = pNext)
	{
		pNext = pSlice; pNext++;
		if (SEqual(pSlice->Source.getData(), Source.getData()))
			FragmentSlices.erase(pSlice);
	}

	// Load new shader
	char szParentPath[_MAX_PATH+1]; C4Group Group;
	StdStrBuf Shader;
	GetParentPath(Source.getData(),szParentPath);
	if(!Group.Open(szParentPath) ||
	   !Group.LoadEntryString(GetFilename(Source.getData()),&Shader) ||
	   !Group.Close())
	{
		ShaderLogF("  gl: Failed to refresh %s shader from %s!", szWhat, Source.getData());
		return Refresh(szWhat, szUniforms);
	}

	// Load slices
	int iSourceTime = FileTime(Source.getData());
	StdStrBuf WhatSrc = FormatString("file %s", Config.AtRelativePath(Source.getData()));
	AddFragmentSlices(WhatSrc.getData(), Shader.getData(), Source.getData(), iSourceTime);

	// Reinitialise
	if (!Init(szWhat, szUniforms))
		return false;

	// Retry
	return Refresh(szWhat, szUniforms);
}
开发者ID:772,项目名称:openclonk,代码行数:45,代码来源:C4Shader.cpp


示例12: Log

bool C4PlayerList::RemoveLocal(bool fDisconnect, bool fNoCalls)
{
	// (used by league system the set local fate)
	C4Player *pPlr;
	do
		for (pPlr = First; pPlr; pPlr = pPlr->Next)
			if (pPlr->LocalControl)
			{
				// Log
				Log(FormatString(LoadResStr("IDS_PRC_REMOVEPLR"),pPlr->GetName()).getData());
				// Remove
				Remove(pPlr, fDisconnect, fNoCalls);
				break;
			}
	while (pPlr);

	return true;
}
开发者ID:sarah-russell12,项目名称:openclonk,代码行数:18,代码来源:C4PlayerList.cpp


示例13: re_search_reverse_helper

int re_search_reverse_helper( EmacsSearch::sea_type RE )
{
    int np;
    EmacsString str;
    if( arg <= 0 )
        arg = 1;
    if( RE == EmacsSearch::sea_type__RE_extended )
        str = getstr("Reverse ERE search for: ");
    else
        str = getstr("Reverse RE search for: ");
    np = sea_glob.search( str, -arg, dot, RE );
    if( np == 0 && ! ml_err )
        error(FormatString("Cannot find \"%s\"") << last_search_string.asString() );
    else
        if( np > 0 )
            set_dot( np );
    return 0;
}
开发者ID:barry-scott,项目名称:BarrysEmacs,代码行数:18,代码来源:search.cpp


示例14: erase_region

int erase_region( void )
{
    if( !bf_cur->b_mark.isSet() )
        error( FormatString(no_mark_set_str) << bf_cur->b_buf_name);
    else
    {
        int n = bf_cur->b_mark.to_mark() - dot;

        if( n < 0 )
        {
            n = -n;
            dot_left (n);
        }
        bf_cur->del_frwd( dot, n );
    }

    return 0;
}
开发者ID:barry-scott,项目名称:BarrysEmacs,代码行数:18,代码来源:simpcomm.cpp


示例15: left_or_right_marker

static int left_or_right_marker( int right )
{
    if( !eval_arg( 1 ) )
        return 0;

    if( ml_value.exp_type() != ISMARKER )
    {
        error( FormatString("%s expects its argument to be a marker") <<
            cur_exec->p_proc->b_proc_name );
        return 0;
    }

    int n = ml_value.asMarker()->get_mark();
    Marker *m = EMACS_NEW Marker( bf_cur, n, right );
    ml_value = m;

    return 0;
}
开发者ID:barry-scott,项目名称:BarrysEmacs,代码行数:18,代码来源:simpcomm.cpp


示例16: AddressModeFromString

	TEXTURE_ADDRESS_MODE AddressModeFromString(const char* sz)
	{
		if (!sz)
			return TEXTURE_ADDRESS_CLAMP;
		if (_stricmp(sz, "Wrap") == 0)
			return TEXTURE_ADDRESS_WRAP;
		if (_stricmp(sz, "Mirror") == 0)
			return TEXTURE_ADDRESS_MIRROR;
		if (_stricmp(sz, "Clamp") == 0)
			return TEXTURE_ADDRESS_CLAMP;
		if (_stricmp(sz, "Border") == 0)
			return TEXTURE_ADDRESS_BORDER;
		if (_stricmp(sz, "Mirror_Once") == 0)
			return TEXTURE_ADDRESS_MIRROR_ONCE;

		Logger::Log(FB_ERROR_LOG_ARG, FormatString("%s is not valid TEXTURE_ADDRESS_MODE", sz).c_str());
		return TEXTURE_ADDRESS_CLAMP;
	}
开发者ID:fastbird,项目名称:fastbirdEngine,代码行数:18,代码来源:RendererEnums.cpp


示例17: assert

QLineEdit *C4ConsoleQtLocalizeStringDlg::AddEditor(const char *language, const char *language_name)
{
	assert(!GetEditorByLanguage(language));
	// Add editor widgets
	int32_t row = edited_languages.size();
	QString language_label_text(language);
	if (language_name) language_label_text.append(FormatString(" (%s)", language_name).getData());
	QLabel *language_label = new QLabel(language_label_text, this);
	ui.mainGrid->addWidget(language_label, row, 0);
	QLineEdit *value_editor = new QLineEdit(this);
	ui.mainGrid->addWidget(value_editor, row, 1);
	// Add to list
	EditedLanguage new_editor;
	SCopy(language, new_editor.language, 2);
	new_editor.value_editor = value_editor;
	edited_languages.push_back(new_editor);
	return value_editor;
}
开发者ID:Fulgen301,项目名称:openclonk,代码行数:18,代码来源:C4ConsoleQtLocalizeString.cpp


示例18: nul

void EmacsView::moveLine
    (
    int old_line_num,
    int new_line_num
    )
{
#if DBG_CALC_INS_DEL
    if( dbg_flags&DBG_CALC_INS_DEL )
    {
        const EmacsChar_t nul( 0 );
        EmacsLinePtr &old_line = t_phys_screen[ old_line_num ];
        EmacsLinePtr &new_line = t_desired_screen[ new_line_num ];

        const int dump_size = 30;
        const EmacsChar_t *old_line_start = &nul;
        int old_line_len = 0;
        if( !old_line.isNull() )
        {
            old_line_start = old_line->line_body;
            old_line_len = old_line->line_length;
        }
        const EmacsChar_t *new_line_start = &nul;
        int new_line_len = 0;
        if( !new_line.isNull() )
        {
            new_line_start = new_line->line_body;
            new_line_len = new_line->line_length;
        }

        _dbg_msg( FormatString( "         moveLine( Ln:%2d Sz%3d:'%.*s'%*s, Ln:%2d Sz%3d:'%.*s'%*s )" )
            << old_line_num
            << old_line_len
                << std::min( old_line_len, dump_size ) << old_line_start
                    << std::max( dump_size-old_line_len, 0 ) << ""
            << new_line_num
            << new_line_len
                << std::min( new_line_len, dump_size ) << new_line_start
                    << std::max( dump_size-new_line_len, 0 ) << ""
            );
    }
#endif

    t_move_line( old_line_num, new_line_num );
}
开发者ID:barry-scott,项目名称:BarrysEmacs,代码行数:44,代码来源:display.cpp


示例19: FilterFromString

	TEXTURE_FILTER FilterFromString(const char* sz)
	{
		if (!sz)
			return TEXTURE_FILTER_MIN_MAG_MIP_LINEAR;
		if (_stricmp(sz, "MIN_MAG_MIP_POINT") == 0)
			return TEXTURE_FILTER_MIN_MAG_MIP_POINT;
		if (_stricmp(sz, "MIN_MAG_POINT_MIP_LINEAR") == 0)
			return TEXTURE_FILTER_MIN_MAG_POINT_MIP_LINEAR;
		if (_stricmp(sz, "MIN_POINT_MAG_LINEAR_MIP_POINT") == 0)
			return TEXTURE_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT;
		if (_stricmp(sz, "MIN_POINT_MAG_MIP_LINEAR") == 0)
			return TEXTURE_FILTER_MIN_POINT_MAG_MIP_LINEAR;
		if (_stricmp(sz, "MIN_LINEAR_MAG_MIP_POINT") == 0)
			return TEXTURE_FILTER_MIN_LINEAR_MAG_MIP_POINT;
		if (_stricmp(sz, "MIN_LINEAR_MAG_POINT_MIP_LINEAR") == 0)
			return TEXTURE_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR;
		if (_stricmp(sz, "MIN_MAG_LINEAR_MIP_POINT") == 0)
			return TEXTURE_FILTER_MIN_MAG_LINEAR_MIP_POINT;
		if (_stricmp(sz, "MIN_MAG_MIP_LINEAR") == 0)
			return TEXTURE_FILTER_MIN_MAG_MIP_LINEAR;
		if (_stricmp(sz, "ANISOTROPIC") == 0)
			return TEXTURE_FILTER_ANISOTROPIC;
		if (_stricmp(sz, "COMPARISON_MIN_MAG_MIP_POINT") == 0)
			return TEXTURE_FILTER_COMPARISON_MIN_MAG_MIP_POINT;
		if (_stricmp(sz, "COMPARISON_MIN_MAG_POINT_MIP_LINEAR") == 0)
			return TEXTURE_FILTER_COMPARISON_MIN_MAG_POINT_MIP_LINEAR;
		if (_stricmp(sz, "COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT") == 0)
			return TEXTURE_FILTER_COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT;
		if (_stricmp(sz, "COMPARISON_MIN_POINT_MAG_MIP_LINEAR") == 0)
			return TEXTURE_FILTER_COMPARISON_MIN_POINT_MAG_MIP_LINEAR;
		if (_stricmp(sz, "COMPARISON_MIN_LINEAR_MAG_MIP_POINT") == 0)
			return TEXTURE_FILTER_COMPARISON_MIN_LINEAR_MAG_MIP_POINT;
		if (_stricmp(sz, "COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR") == 0)
			return TEXTURE_FILTER_COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR;
		if (_stricmp(sz, "COMPARISON_MIN_MAG_LINEAR_MIP_POINT") == 0)
			return TEXTURE_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT;
		if (_stricmp(sz, "COMPARISON_MIN_MAG_MIP_LINEAR") == 0)
			return TEXTURE_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR;
		if (_stricmp(sz, "COMPARISON_ANISOTROPIC") == 0)
			return TEXTURE_FILTER_COMPARISON_ANISOTROPIC;

		Logger::Log(FB_ERROR_LOG_ARG, FormatString("%s is not vaild TEXTURE_FILTER", sz).c_str());
		return TEXTURE_FILTER_MIN_MAG_MIP_LINEAR;
	}
开发者ID:fastbird,项目名称:fastbirdEngine,代码行数:44,代码来源:RendererEnums.cpp


示例20: Filesets_ShowProperties

void Filesets_ShowProperties (LPIDENT lpiFileset, size_t nAlerts, BOOL fJumpToThreshold)
{
   HWND hCurrent;
   if ((hCurrent = PropCache_Search (pcSET_PROP, lpiFileset)) != NULL)
      {
      SetFocus (hCurrent);

      if (fJumpToThreshold)
         {
         HWND hTab;
         if ((hTab = GetDlgItem (hCurrent, IDC_PROPSHEET_TABCTRL)) != NULL)
            {
            int nTabs = TabCtrl_GetItemCount (hTab);
            TabCtrl_SetCurSel (hTab, nTabs-1);

            NMHDR nm;
            nm.hwndFrom = hTab;
            nm.idFrom = IDC_PROPSHEET_TABCTRL;
            nm.code = TCN_SELCHANGE;
            SendMessage (hCurrent, WM_NOTIFY, 0, (LPARAM)&nm);
            }
         }
      }
   else
      {
      TCHAR szCell[ cchNAME ];
      lpiFileset->GetCellName (szCell);

      TCHAR szFileset[ cchNAME ];
      lpiFileset->GetFilesetName (szFileset);

      LPTSTR pszTitle = FormatString (IDS_SET_PROP_TITLE, TEXT("%s"), szFileset);
      LPPROPSHEET psh = PropSheet_Create (pszTitle, FALSE);
      psh->fMadeCaption = TRUE;

      if (PropSheet_AddProblemsTab (psh, IDD_SET_PROBLEMS, lpiFileset, nAlerts) &&
          PropSheet_AddTab (psh, IDS_SET_GENERAL_TAB, IDD_SET_GENERAL, (DLGPROC)Filesets_General_DlgProc, (LPARAM)lpiFileset, TRUE))
         {
         if (fJumpToThreshold)
            psh->sh.nStartPage = psh->sh.nPages-1;
         PropSheet_ShowModeless (psh);
         }
      }
}
开发者ID:bagdxk,项目名称:openafs,代码行数:44,代码来源:set_prop.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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