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

C++ GetString函数代码示例

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

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



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

示例1: ClassName

	const TCHAR *	ClassName() { return GetString(IDS_AP_PYRAMID_CLASS); }
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:1,代码来源:pyramid.cpp


示例2: WXUNUSED

bool wxComboBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
{
    wxString value;
    int sel = -1;
    switch ( param )
    {
        case CBN_SELENDOK:
        case CBN_SELCHANGE:
            sel = GetSelection();

            // we may sometimes get 2 CBN_SELCHANGE events or a CBN_SELENDOK
            // before CBN_SELCHANGE with the same index when the user selects
            // an item in the combobox -- ignore duplicates
            if ( sel > -1 && sel != m_selectionOld )
            {
                m_selectionOld = sel;

                // GetValue() would still return the old value from here but
                // according to the docs we should return the new value if the
                // user calls it in his event handler, so update internal
                // m_value
                m_value = GetString(sel);

                wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, GetId());
                event.SetInt(sel);
                event.SetEventObject(this);
                event.SetString(m_value);
                ProcessCommand(event);
            }
            else // no valid selection
            {
                m_selectionOld = sel;

                // hence no EVT_TEXT neither
                break;
            }

            // fall through: for compability with wxGTK, also send the text
            // update event when the selection changes (this also seems more
            // logical as the text does change)

        case CBN_EDITCHANGE:
            {
                wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, GetId());

                // if sel != -1, value was initialized above (and we can't use
                // GetValue() here as it would return the old selection and we
                // want the new one)
                if ( sel == -1 )
                {
                    m_value = wxGetWindowText(GetHwnd());
                    m_selectionOld = -1;
                }
                else // we're synthesizing text updated event from sel change
                {
                    // We need to retrieve the current selection because the
                    // user may have changed it in the previous handler (for
                    // CBN_SELCHANGE above).
                    sel = GetSelection();
                    if ( sel > -1 )
                    {
                        m_value = GetString(sel);
                    }
                }

                event.SetString(m_value);
                event.SetEventObject(this);
                ProcessCommand(event);
            }
            break;
    }

    // there is no return value for the CBN_ notifications, so always return
    // false from here to pass the message to DefWindowProc()
    return false;
}
开发者ID:HackLinux,项目名称:chandler-1,代码行数:76,代码来源:combobox.cpp


示例3: setup_font_select_menu

 static void setup_font_select_menu(GtkWidget *widget)
 {
	gchar * selected = GetString("Terminal","Font","Courier");
	load_font_menu(widget, selected);
	g_free(selected);
 }
开发者ID:laubstein,项目名称:pw3270,代码行数:6,代码来源:topwindow.c


示例4: ClassName

	const TCHAR *	ClassName() { return GetString(IDS_RB_MIRRORMOD); }
开发者ID:2asoft,项目名称:xray,代码行数:1,代码来源:mirror.cpp


示例5: GetClassName

		void GetClassName(TSTR& s) {s = GetString(IDS_RB_MIRRORMOD);}  
开发者ID:2asoft,项目名称:xray,代码行数:1,代码来源:mirror.cpp


示例6: ClassName

	const TCHAR *	ClassName() { return GetString(IDS_CLASS_NAME); }
开发者ID:MrLobo,项目名称:El-Rayo-de-Zeus,代码行数:1,代码来源:PhyExport.cpp


示例7: GetString

//+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>+
//|							From BaseObject									 |
//+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>+
TCHAR* PFTestGoToNextEvent::GetObjectName()
{
	return GetString(IDS_TEST_GOTONEXTEVENT_OBJECT_NAME);
}
开发者ID:DimondTheCat,项目名称:xray,代码行数:7,代码来源:PFTestGoToNextEvent.cpp


示例8: readPTC

ParticlesDataMutable* readPTC(const char* filename,const bool headersOnly)
{
    std::auto_ptr<std::istream> input(Gzip_In(filename,std::ios::in|std::ios::binary));
    if(!*input){
        std::cerr<<"Partio: Unable to open file "<<filename<<std::endl;
        return 0;
    }

    int magic;
    read<LITEND>(*input,magic);
    if(ptc_magic!=magic){
        std::cerr<<"Partio: Magic number '"<<magic<<"' of '"<<filename<<"' doesn't match pptc magic '"<<ptc_magic<<"'"<<std::endl;
        return 0;
    }

    int version;
    read<LITEND>(*input,version);

    double nPoints;
    read<LITEND>(*input,nPoints);

    // TODO: allow access to this in the headers only mode for times when only bbox is necessary
    float xmin,ymin,zmin,xmax,ymax,zmax;
    read<LITEND>(*input,xmin,ymin,zmin,xmax,ymax,zmax);

    float dummy;
    if (version>=1) for (int d=0;d<4;d++) read<LITEND>(*input,dummy);

    // world-to-eye
    for(int i=0;i<16;i++) read<LITEND>(*input,dummy);
    // eye-to-screen
    for(int i=0;i<16;i++) read<LITEND>(*input,dummy);

    float imgWidth,imgHeight,imgDepth;
    read<LITEND>(*input,imgWidth,imgHeight,imgDepth);

    int nVars,dataSize;
    read<LITEND>(*input,nVars,dataSize);

    // Allocate a simple particle with the appropriate number of points
    ParticlesDataMutable* simple=0;
    if(headersOnly) simple=new ParticleHeaders;
    else simple=create();
    simple->addParticles((int)nPoints);

    // PTC files always have something for these items, so allocate the data
    std::vector<ParticleAttribute> attrHandles;
    ParticleAttribute positionHandle=simple->addAttribute("position",VECTOR,3);
    ParticleAttribute normalHandle=simple->addAttribute("normal",VECTOR,3);
    ParticleAttribute radiusHandle=simple->addAttribute("radius",FLOAT,1);
    std::string typeName,name;

    // data types are "float", "point", "vector", "normal", "color", or "matrix"
    int parsedSize=0;
    for(int chanNum=0;chanNum<nVars;chanNum++){
        ParseSpec(GetString(*input,'\n'),typeName,name);

        int dataSize=0;
        ParticleAttributeType dataType;
        if(typeName=="color" || typeName=="vector" || typeName=="point" || typeName=="color"){
            dataType=VECTOR;
            dataSize=3;
        }else if(typeName=="matrix"){
            dataType=FLOAT;
            dataSize=16;
        }else if(typeName=="float"){
            dataType=FLOAT;
            dataSize=1;
        }else{
            std::cerr<<"Partio: "<<filename<<" had unknown attribute spec "<<typeName<<" "<<name<<std::endl;
            simple->release();
            return 0;
        }

        attrHandles.push_back(simple->addAttribute(name.c_str(),dataType,dataSize));
        parsedSize+=dataSize;
    }
    if(dataSize!=parsedSize){
        std::cerr<<"Partio: error with PTC, computed dataSize ("<<dataSize
                 <<") different from read one ("<<parsedSize<<")"<<std::endl;
        simple->release();
        return 0;
    }

    // If all we care about is headers, then return.  
    if(headersOnly){
        return simple;
    }

    // more weird input attributes
    if(version>=1) for(int i=0;i<2;i++) read<LITEND>(*input,dummy);

    for(int pointIndex=0;pointIndex<nPoints;pointIndex++){
        float* pos=simple->dataWrite<float>(positionHandle,pointIndex);
        read<LITEND>(*input,pos[0],pos[1],pos[2]);

        unsigned short phi,z; // normal encoded
        read<LITEND>(*input,phi,z);
        float* norm=simple->dataWrite<float>(normalHandle,pointIndex);

//.........这里部分代码省略.........
开发者ID:K240,项目名称:partio,代码行数:101,代码来源:PTC.cpp


示例9: ClassName

 const TCHAR *  ClassName() { return GetString(IDS_RB_TWIST_CLASS); }
开发者ID:artemeliy,项目名称:inf4715,代码行数:1,代码来源:twist.cpp


示例10: GetString

std::string ConfigFile::GetStringDefault(const char * block, const char* name, const char* def)
{
	string ret;
	return GetString(block, name, &ret) ? ret : def;
}
开发者ID:arcticdev,项目名称:arcticdev,代码行数:5,代码来源:Config.cpp


示例11: _T

_bstr_t ExcelSchemaSoftDiscoverStrategy::GetSheetName(ChUINT4 sheetIndex)
{
   if((sheetIndex < 0) || (sheetIndex >= GetSheetCount()))
      return _T("");
   return GetString(m_pSheetNames->at(sheetIndex));
}
开发者ID:killbug2004,项目名称:WSProf,代码行数:6,代码来源:ExcelSchemaSoftDiscoverStrategy.cpp


示例12: BuildNURBSPyramid

Object*
BuildNURBSPyramid(float width, float depth, float height, int genUVs)
{
	int pyramid_faces[5][4] = { {0, 1, 2, 3}, // bottom
							{2, 3, 4, 4}, // back
							{1, 0, 4, 4}, // front
							{3, 1, 4, 4}, // left
							{0, 2, 4, 4}};// right
	Point3 pyramid_verts[5] = { Point3(-0.5, -0.5, 0.0),
							Point3( 0.5, -0.5, 0.0),
							Point3(-0.5,  0.5, 0.0),
							Point3( 0.5,  0.5, 0.0),
							Point3( 0.0,  0.0, 1.0)};

	NURBSSet nset;

	for (int face = 0; face < 5; face++) {
		Point3 bl = pyramid_verts[pyramid_faces[face][0]];
		Point3 br = pyramid_verts[pyramid_faces[face][1]];
		Point3 tl = pyramid_verts[pyramid_faces[face][2]];
		Point3 tr = pyramid_verts[pyramid_faces[face][3]];

		Matrix3 size;
		size.IdentityMatrix();
		Point3 lwh(width, depth, height);
		size.Scale(lwh);

		bl = bl * size;
		br = br * size;
		tl = tl * size;
		tr = tr * size;

		NURBSCVSurface *surf = new NURBSCVSurface();
		nset.AppendObject(surf);
		surf->SetUOrder(4);
		surf->SetVOrder(4);
		surf->SetNumCVs(4, 4);
		surf->SetNumUKnots(8);
		surf->SetNumVKnots(8);

		Point3 top, bot;
		for (int r = 0; r < 4; r++) {
			top = tl + (((float)r/3.0f) * (tr - tl));
			bot = bl + (((float)r/3.0f) * (br - bl));
			for (int c = 0; c < 4; c++) {
				NURBSControlVertex ncv;
				ncv.SetPosition(0, bot + (((float)c/3.0f) * (top - bot)));
				ncv.SetWeight(0, 1.0f);
				surf->SetCV(r, c, ncv);
			}
		}

		for (int k = 0; k < 4; k++) {
			surf->SetUKnot(k, 0.0);
			surf->SetVKnot(k, 0.0);
			surf->SetUKnot(k + 4, 1.0);
			surf->SetVKnot(k + 4, 1.0);
		}

		surf->Renderable(TRUE);
		surf->SetGenerateUVs(genUVs);
		if (height > 0.0f)
			surf->FlipNormals(TRUE);
		else
			surf->FlipNormals(FALSE);

		switch(face) {
		case 0: // bottom
			surf->SetTextureUVs(0, 0, Point2(1.0f, 0.0f));
			surf->SetTextureUVs(0, 1, Point2(0.0f, 0.0f));
			surf->SetTextureUVs(0, 2, Point2(1.0f, 1.0f));
			surf->SetTextureUVs(0, 3, Point2(0.0f, 1.0f));
			break;
		default: // sides
			surf->SetTextureUVs(0, 0, Point2(0.5f, 1.0f));
			surf->SetTextureUVs(0, 1, Point2(0.5f, 1.0f));
			surf->SetTextureUVs(0, 2, Point2(0.0f, 0.0f));
			surf->SetTextureUVs(0, 3, Point2(1.0f, 0.0f));
			break;
		}

		TCHAR bname[80];
		_stprintf(bname, _T("%s%02d"), GetString(IDS_CT_SURF), face);
		surf->SetName(bname);
	}

#define F(s1, s2, s1r, s1c, s2r, s2c) \
	fuse.mSurf1 = (s1); \
	fuse.mSurf2 = (s2); \
	fuse.mRow1 = (s1r); \
	fuse.mCol1 = (s1c); \
	fuse.mRow2 = (s2r); \
	fuse.mCol2 = (s2c); \
	nset.mSurfFuse.Append(1, &fuse);

	NURBSFuseSurfaceCV fuse;
	// Fuse the degenerate peaks
	for (int i = 1; i < 5; i++) {
		for (int j = 1; j < 4; j++) {
			F(i, i, 0, 3, j, 3);
//.........这里部分代码省略.........
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:101,代码来源:pyramid.cpp


示例13: GetString

		const TCHAR *GetObjectName() { return GetString(IDS_RB_PYRAMID); }
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:1,代码来源:pyramid.cpp


示例14: Category

	const TCHAR* 	Category() { return GetString(IDS_AP_PRIMITIVES);  }
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:1,代码来源:pyramid.cpp


示例15: ClearPatchDataFlag

// Edger Delete modifier method
void EditPatchMod::DoEdgeDelete() 
{
	ModContextList mcList;		
	INodeTab nodes;
	TimeValue t = ip->GetTime();
	int holdNeeded = 0;
	
	if (!ip)
		return;
	
	ip->GetModContexts(mcList, nodes);
	ClearPatchDataFlag(mcList, EPD_BEENDONE);
	
	theHold.Begin();
	RecordTopologyTags();
	for (int i = 0; i < mcList.Count(); i++)
	{
		int altered = 0;
		EditPatchData *patchData =(EditPatchData*)mcList[i]->localData;
		if (!patchData)
			continue;
		if (patchData->GetFlag(EPD_BEENDONE))
			continue;
		
		// If the mesh isn't yet cache, this will cause it to get cached.
		RPatchMesh *rpatch;
		PatchMesh *patch = patchData->TempData(this)->GetPatch(t, rpatch);
		if (!patch)
			continue;
		patchData->RecordTopologyTags(patch);
		
		// If this is the first edit, then the delta arrays will be allocated
		patchData->BeginEdit(t);
		
		// If any bits are set in the selection set, let's DO IT!!
		if (patch->edgeSel.NumberSet())
		{
			altered = holdNeeded = 1;
			if (theHold.Holding())
				theHold.Put(new PatchRestore(patchData, this, patch, rpatch, "DoEdgeDelete"));
			int edges = patch->getNumEdges();
			int patches = patch->getNumPatches();
			int verts = patch->getNumVerts();
			
			// Tag the patches that are attached to selected edges
			BitArray delPatches(patches);
			delPatches.ClearAll();
			
			for (int i = 0; i < edges; ++i)
			{
				if (patch->edgeSel[i])
				{
#if (MAX_RELEASE < 4000)
					if (patch->edges[i].patch1 >= 0)
						delPatches.Set(patch->edges[i].patch1);
					if (patch->edges[i].patch2 >= 0)
						delPatches.Set(patch->edges[i].patch2);
#else // (MAX_RELEASE < 4000)
					if (patch->edges[i].patches[0] >= 0)
						delPatches.Set(patch->edges[i].patches[0]);
					if (patch->edges[i].patches[1] >= 0)
						delPatches.Set(patch->edges[i].patches[1]);
#endif // (MAX_RELEASE < 4000)
				}
			}
			
			BitArray delVerts(verts);
			delVerts.ClearAll();
			
			DeletePatchParts(patch, rpatch, delVerts, delPatches);
			patch->computeInteriors();
			
			patchData->UpdateChanges(patch, rpatch);
			patchData->TempData(this)->Invalidate(PART_TOPO);
		}
		patchData->SetFlag(EPD_BEENDONE, TRUE);
	}
	
	if (holdNeeded)
	{
		ResolveTopoChanges();
		theHold.Accept(GetString(IDS_TH_EDGEDELETE));
	}
	else 
	{
		ip->DisplayTempPrompt(GetString(IDS_TH_NOEDGESSEL), PROMPT_TIME);
		theHold.End();
	}
	
	nodes.DisposeTemporary();
	ClearPatchDataFlag(mcList, EPD_BEENDONE);
	NotifyDependents(FOREVER, PART_TOPO, REFMSG_CHANGE);
	ip->RedrawViews(ip->GetTime(), REDRAW_NORMAL);
}
开发者ID:CCChaos,项目名称:RyzomCore,代码行数:95,代码来源:NP_EPM_Del.cpp


示例16: GetClassName

 void GetClassName(TSTR& s) { s= GetString(IDS_RB_TWISTMOD); }  
开发者ID:artemeliy,项目名称:inf4715,代码行数:1,代码来源:twist.cpp


示例17: GetString

 const TCHAR *GetObjectName() {return GetString(IDS_RB_TWIST);}
开发者ID:artemeliy,项目名称:inf4715,代码行数:1,代码来源:twist.cpp


示例18: Category

	const TCHAR* 	Category() { return GetString(IDS_CATEGORY); }
开发者ID:MrLobo,项目名称:El-Rayo-de-Zeus,代码行数:1,代码来源:PhyExport.cpp


示例19: __declspec

__declspec( dllexport ) const TCHAR *
LibDescription() { return GetString(IDS_LIBDESC); }
开发者ID:2asoft,项目名称:xray,代码行数:2,代码来源:plugin.cpp


示例20: main

// program to encrypt user string by keyword entered in command line
int main(int argc, string argv[])
{
    // declare variables
    int shift;
    int KeyValue;
 
    // only accept two command line arguments
    if (argc != 2)
    {
        printf("You screwed up!!!\n");
        return 1;
    }
 
    // capture the second command line argument as a string
    string key = argv[1]; 
 
    // iterate through the key to make sure it's alphabetical
    for (int n = 0, keylength = strlen(argv[1]); n < keylength; n++)
    {
        if ((key[n] >= '0') && (key[n] <= '9'))
        {
            printf("Sorry!\n");
            return 1;
        }
    }
 
    // get the plain text
    string PlainText = GetString();   
 
    // iterating through plaintext
    for(int i = 0, j = 0, length = strlen(PlainText); i < length; i++, j++)
    {
        // start the key again if key shorter than PlainText
        if (j >= strlen(key))
        {
            j = 0;
        }
 
        // declared a variable of a different name 
        KeyValue = key[j]; 
 
        // skip key[j] if PlainText[i] is not an alpha character
        if (!isalpha(PlainText[i]))
        {
            j = (j - 1);
        }  
 
        // makes Aa = 0, Zz = 25 for the uppercase letters 
        if ((KeyValue >= 'A') && (KeyValue <= 'Z'))
        {
            KeyValue = (KeyValue - 'A');
        }
 
        // makes Aa = 0, Zz = 25 for the lowercase letters
        if ((KeyValue >= 'a') && (KeyValue <= 'z'))
        {
            KeyValue = (KeyValue - 'a');
        }
 
        // encryption
        shift = (PlainText[i] + KeyValue);
 
        // wrapping after Z for uppercase letters
        if (isupper(PlainText[i]) && (shift > 'Z'))
        {
            shift = (shift - 26);
        }
 
        // wrapping after z for lowercase letters
        if (islower(PlainText[i]) && (shift > 'z'))
        {
            shift = (shift - 26);
        }
 
 
        // if character is alphabetical, print encrypted result
        if (isalpha(PlainText[i]))
        {
            printf("%c", shift);
        }
 
       // if non-alphabetical character, print as is   
        else
        {
            printf("%c", PlainText[i]);
        }
 
    }  
    printf("\n");
    return 0;
}
开发者ID:raju249,项目名称:CS50,代码行数:92,代码来源:vigenere.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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