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


C++ ISpinnerControl::SetValue方法代码示例

本文整理汇总了C++中ISpinnerControl::SetValue方法的典型用法代码示例。如果您正苦于以下问题:C++ ISpinnerControl::SetValue方法的具体用法?C++ ISpinnerControl::SetValue怎么用?C++ ISpinnerControl::SetValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ISpinnerControl的用法示例。


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

示例1: UpdateUI

void BombObject::UpdateUI(TimeValue t)
	{
	if (hParam && !waitPostLoad) {
      if (this == DLGetWindowLongPtr<BombObject *>(hParam)) {
			strengthSpin->SetValue(GetStrength(t),FALSE);
			gravSpin->SetValue(GetGravity(t),FALSE);
			chaosSpin->SetValue(GetChaos(t),FALSE);			
			falloffSpin->SetValue(GetFalloff(t),FALSE);
			spinSpin->SetValue(GetSpin(t),FALSE);

			if (pblock->KeyFrameAtTime(PB_STRENGTH,t))
				 strengthSpin->SetKeyBrackets(TRUE);
			else strengthSpin->SetKeyBrackets(FALSE);

			if (pblock->KeyFrameAtTime(PB_GRAVITY,t))
				 gravSpin->SetKeyBrackets(TRUE);
			else gravSpin->SetKeyBrackets(FALSE);

			if (pblock->KeyFrameAtTime(PB_CHAOS,t))
				 chaosSpin->SetKeyBrackets(TRUE);
			else chaosSpin->SetKeyBrackets(FALSE);

			if (pblock->KeyFrameAtTime(PB_SPIN,t))
				 spinSpin->SetKeyBrackets(TRUE);
			else spinSpin->SetKeyBrackets(FALSE);

			if (pblock->KeyFrameAtTime(PB_FALLOFF,t))
				 falloffSpin->SetKeyBrackets(TRUE);
			else falloffSpin->SetKeyBrackets(FALSE);
			}
		}
	}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:32,代码来源:bomb.cpp

示例2: LoadDialog

void  StraussShaderDlg::LoadDialog(BOOL draw) 
{
   if (pShader && hRollup) {
      glSpin->SetValue( FracToPc( pShader->GetGlossiness() ),FALSE);
      glSpin->SetKeyBrackets(KeyAtCurTime(st_glossiness));
      
      mtSpin->SetValue( FracToPc( pShader->GetMetalness() ), FALSE);
      mtSpin->SetKeyBrackets(KeyAtCurTime(st_metalness));

      trSpin->SetValue(FracToPc(pMtl->GetOpacity(curTime)),FALSE);
      trSpin->SetKeyBrackets(pMtl->KeyAtTimeByID(OPACITY_PARAM, curTime));

      UpdateColSwatches();
      UpdateHilite();

      IParamBlock2 * shaderpblock = pShader->pblock;
      if ( shaderpblock ) {
		  cs[0]->UpdateEnableState( shaderpblock, shaderpblock->GetAnimNum( st_diffuse ) );
		  glSpin->UpdateEnableState( shaderpblock, shaderpblock->GetAnimNum( st_glossiness ) );
		  mtSpin->UpdateEnableState( shaderpblock, shaderpblock->GetAnimNum( st_metalness ) );
	  }
	  // trSpin: opacity is accessed through the material: only handle StdMat2.
	  EnableMtl2OpacityControl( pMtl, trSpin );
   }
}
开发者ID:artemeliy,项目名称:inf4715,代码行数:25,代码来源:shaderstrauss.cpp

示例3: LoadDialog

void  WardShaderDlg::LoadDialog(BOOL draw) 
{
	if (pShader && hRollup) {
		dlevSpin->SetValue(FracToPc(pShader->GetDiffuseLevel()),FALSE);
		dlevSpin->SetKeyBrackets(KeyAtCurTime(PB_DIFFUSE_LEV));

		slevSpin->SetValue(FracToPc(pShader->GetSpecularLevel()/SPEC_MAX),FALSE);
		slevSpin->SetKeyBrackets(KeyAtCurTime(PB_SPECULAR_LEV));

		glxSpin->SetValue( 100.0f * ((ALPHA_MAX - pShader->GetGlossiness())/ALPHA_SZ),FALSE);
		glxSpin->SetKeyBrackets(KeyAtCurTime(PB_GLOSSINESS_X));
		glySpin->SetValue(100.0f * ((ALPHA_MAX - pShader->GetGlossinessY())/ALPHA_SZ),FALSE);
		glySpin->SetKeyBrackets(KeyAtCurTime(PB_GLOSSINESS_Y));

		trSpin->SetValue(FracToPc(pMtl->GetOpacity( curTime )),FALSE);
		trSpin->SetKeyBrackets(pMtl->KeyAtTime(OPACITY_PARAM, curTime));

		CheckButton(hRollup, IDC_LOCK_AD, pShader->GetLockAD() );
		CheckButton(hRollup, IDC_LOCK_DS, pShader->GetLockDS() );
		SetCheckBox(hRollup, IDC_NORMALIZE_CHECK, !pShader->GetNormalizeOn() ); 
	 	UpdateLockADTex( FALSE ); //don't send to mtl

		UpdateColSwatches();
		UpdateHilite();
	}
}
开发者ID:2asoft,项目名称:xray,代码行数:26,代码来源:shaderward.cpp

示例4: SetupWindow

void RandKeysUtil::SetupWindow(HWND hWnd)
	{	
	this->hWnd = hWnd;

	CheckDlgButton(hWnd,IDC_RANDKEYS_TIME,doTime);
	CheckDlgButton(hWnd,IDC_RANDKEYS_VAL,doVal);

	iPosTime = GetISpinner(GetDlgItem(hWnd,IDC_RANDKEYS_POSTIMESPIN));
	iPosTime->SetLimits(0, TIME_PosInfinity, FALSE);
	iPosTime->SetScale(10.0f);
	iPosTime->LinkToEdit(GetDlgItem(hWnd,IDC_RANDKEYS_POSTIME), EDITTYPE_TIME);
	iPosTime->SetValue(posTime,FALSE);

	iNegTime = GetISpinner(GetDlgItem(hWnd,IDC_RANDKEYS_NEGTIMESPIN));
	iNegTime->SetLimits(0, TIME_PosInfinity, FALSE);
	iNegTime->SetScale(10.0f);
	iNegTime->LinkToEdit(GetDlgItem(hWnd,IDC_RANDKEYS_NEGTIME), EDITTYPE_TIME);
	iNegTime->SetValue(negTime,FALSE);

	iPosVal = GetISpinner(GetDlgItem(hWnd,IDC_RANDKEYS_POSVALSPIN));
	iPosVal->SetLimits(0.0f, 999999999.9f, FALSE);
	iPosVal->SetScale(0.1f);
	iPosVal->LinkToEdit(GetDlgItem(hWnd,IDC_RANDKEYS_POSVAL), EDITTYPE_FLOAT);
	iPosVal->SetValue(posVal,FALSE);

	iNegVal = GetISpinner(GetDlgItem(hWnd,IDC_RANDKEYS_NEGVALSPIN));
	iNegVal->SetLimits(0.0f, 999999999.0f, FALSE);
	iNegVal->SetScale(0.1f);
	iNegVal->LinkToEdit(GetDlgItem(hWnd,IDC_RANDKEYS_NEGVAL), EDITTYPE_FLOAT);
	iNegVal->SetValue(negVal,FALSE);

	SetStates();
	}
开发者ID:DimondTheCat,项目名称:xray,代码行数:33,代码来源:randkeys.cpp

示例5: ExportDlgProc

// Dialog proc
static INT_PTR CALLBACK ExportDlgProc(HWND hWnd, UINT msg,
	WPARAM wParam, LPARAM lParam)
{
	Interval animRange;
	ISpinnerControl  *spin;

	AscOut *exp = (AscOut*)GetWindowLongPtr(hWnd,GWLP_USERDATA); 
	switch (msg) {
	case WM_INITDIALOG:
		exp = (AscOut*)lParam;
		SetWindowLongPtr(hWnd,GWLP_USERDATA,lParam); 
		CenterWindow(hWnd, GetParent(hWnd)); 

		// Setup the spinner controls for the floating point precision 
		spin = GetISpinner(GetDlgItem(hWnd, IDC_PREC_SPIN)); 
		spin->LinkToEdit(GetDlgItem(hWnd,IDC_PREC), EDITTYPE_INT ); 
		spin->SetLimits(1, 10, TRUE); 
		spin->SetScale(1.0f);
		spin->SetValue(exp->GetPrecision() ,FALSE);
		ReleaseISpinner(spin);

		// Setup the spinner control for the static frame#
		// We take the frame 0 as the default value
		animRange = exp->GetInterface()->GetAnimRange();
		spin = GetISpinner(GetDlgItem(hWnd, IDC_STATIC_FRAME_SPIN)); 
		spin->LinkToEdit(GetDlgItem(hWnd,IDC_STATIC_FRAME), EDITTYPE_INT ); 
		spin->SetLimits(animRange.Start() / GetTicksPerFrame(), animRange.End() / GetTicksPerFrame(), TRUE); 
		spin->SetScale(1.0f);
		spin->SetValue(0, FALSE);
		ReleaseISpinner(spin);
		break;

	case CC_SPINNER_CHANGE:
		spin = (ISpinnerControl*)lParam; 
		break;

	case WM_COMMAND:
		switch (LOWORD(wParam)) {
		case IDOK:
			spin = GetISpinner(GetDlgItem(hWnd, IDC_PREC_SPIN)); 
			exp->SetPrecision(spin->GetIVal());
			ReleaseISpinner(spin);
		
			spin = GetISpinner(GetDlgItem(hWnd, IDC_STATIC_FRAME_SPIN)); 
			exp->SetStaticFrame(spin->GetIVal() * GetTicksPerFrame());
			ReleaseISpinner(spin);
			
			EndDialog(hWnd, 1);
			break;
		case IDCANCEL:
			EndDialog(hWnd, 0);
			break;
		}
		break;
		default:
			return FALSE;
	}
	return TRUE;
}       
开发者ID:DimondTheCat,项目名称:xray,代码行数:60,代码来源:ascout.cpp

示例6: if

Value*
FooControl::set_property(Value** arg_list, int count)
{
	Value* val = arg_list[0];
	Value* prop = arg_list[1];

	if (prop == n_value)
	{
		value = val->to_float();
		if (parent_rollout != NULL && parent_rollout->page != NULL)
		{
			ISpinnerControl* spin = GetISpinner(GetDlgItem(parent_rollout->page, control_ID));
			if (spin_type == EDITTYPE_INT)
				spin->SetValue((int)value, FALSE);
			else
				spin->SetValue(value, FALSE);
			ReleaseISpinner(spin);
		}
	}
	else if (prop == n_range)
	{
		Point3 p;
		if (is_point3(val))
			p = val->to_point3();
		else
			throw TypeError (MaxSDK::GetResourceStringAsMSTR(IDS_SPINNER_RANGE_MUST_BE_A_VECTOR), val);
		min = p.x; max = p.y; value = p.z;

		if (parent_rollout != NULL && parent_rollout->page != NULL)
		{
			ISpinnerControl* spin = GetISpinner(GetDlgItem(parent_rollout->page, control_ID));
			if (spin_type == EDITTYPE_INT)
			{
				spin->SetLimits((int)p.x, (int)p.y, FALSE);
				spin->SetScale(1.0F);
				spin->SetValue((int)p.z, FALSE);
			}
			else
			{
				spin->SetLimits(p.x, p.y, FALSE);
				spin->SetScale(0.1F);
				spin->SetValue(p.z, FALSE);
			}
			ReleaseISpinner(spin);
		}
	}
	else
		return RolloutControl::set_property(arg_list, count);

	return val;
}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:51,代码来源:tester.cpp

示例7: TrackPropDlgProc

INT_PTR CALLBACK TrackPropDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) {
	BlockControl *blk = (BlockControl*)GetWindowLongPtr(hWnd,GWLP_USERDATA);

	ISpinnerControl *spin;
	static TSTR zero = FormatUniverseValue(0.0f);
	Rect rect;

	switch (msg) {
	case WM_INITDIALOG:
		{
		blk = (BlockControl*)lParam;
		SetWindowLongPtr(hWnd,GWLP_USERDATA,lParam);

		Interval range = GetCOREInterface()->GetAnimRange();

		
		spin = GetISpinner(GetDlgItem(hWnd,IDC_STARTSPIN));
		spin->SetLimits(-999999.0f,9999999.0f, FALSE);
		spin->SetAutoScale();
		spin->LinkToEdit(GetDlgItem(hWnd,IDC_START), EDITTYPE_INT);
		spin->SetValue(range.Start()/GetTicksPerFrame(),FALSE);
		ReleaseISpinner(spin);

		blk->propStart = range.Start()/GetTicksPerFrame();
		CenterWindow(hWnd,GetParent(hWnd));
		break;
		}
		
	case CC_SPINNER_CHANGE:
		spin = (ISpinnerControl*)lParam;
		switch (LOWORD(wParam)) {
		case IDC_STARTSPIN: blk->propStart = spin->GetIVal(); break;
		}
		break;



	case WM_COMMAND:
		switch (LOWORD(wParam)) {
		case IDOK:
			{
			EndDialog(hWnd,1);
			blk->NotifyDependents(FOREVER, PART_ALL, REFMSG_CHANGE);

			break;
			}
		case IDCANCEL:
			EndDialog(hWnd,0);
			break;
		}
		break;

	default:
		return FALSE;
	}
	return TRUE;
}
开发者ID:2asoft,项目名称:xray,代码行数:57,代码来源:blockcontrol.cpp

示例8: UpdateDialog

void EditFaceDataMod::UpdateDialog () {	
	TSTR buf;
	int numFaces=0, whichFace=0;
	float value = 1.0f;
	bool valueDetermined = true;

	if (!hParams) return;

	ModContextList mcList;
	INodeTab nodes;
	ip->GetModContexts(mcList,nodes);

	if (selLevel) {
		for (int i = 0; i < mcList.Count(); i++) {
			EditFaceDataModData *meshData = (EditFaceDataModData*)mcList[i]->localData;
			if (!meshData) continue;
			int numSelectedHere;
			meshData->DescribeSelection (numSelectedHere, whichFace, value, valueDetermined);
			numFaces += numSelectedHere;
		}
	}

	ISpinnerControl *spin = GetISpinner (GetDlgItem (hParams, IDC_VALUE_SPIN));
	ICustButton *but = GetICustButton (GetDlgItem (hParams, IDC_RESET_SELECTION));

	switch (selLevel) {
	case SEL_FACE:
		if (numFaces==1) {
			buf.printf (GetString(IDS_FACE_SELECTED), whichFace+1);
		} else {
			if (numFaces) buf.printf (GetString (IDS_FACES_SELECTED), numFaces);
			else buf = GetString (IDS_NO_FACE_SELECTED);
		}
		but->Enable (numFaces);
		spin->Enable (numFaces);
		if (numFaces && valueDetermined) {
			spin->SetIndeterminate (false);
			spin->SetValue (value, FALSE);
		} else {
			spin->SetIndeterminate (true);
		}
		break;

	case SEL_OBJECT:
		buf = GetString (IDS_OBJECT_SELECTED);
		spin->Disable();
		but->Disable ();
		break;
	}

	SetDlgItemText(hParams,IDC_FACE_SELECTED,buf);
	ReleaseISpinner (spin);
	ReleaseICustButton (but);
}
开发者ID:2asoft,项目名称:xray,代码行数:54,代码来源:EditFaceData.cpp

示例9: OnSetWidthLength

//void RendSpline::UpdateAspect(HWND hWnd, TimeValue t)
//{
//	
//	//ISpinnerControl *iSpin = GetISpinner(GetDlgItem(hWnd, IDC_ASPECTSPIN));
//	//
//	//iSpin->SetValue(this->GetAspect((UseViewOrRenderParams(t)== rbViewport)),FALSE);
//	//ReleaseISpinner(iSpin);
//}
void RendSpline::OnSetWidthLength(HWND hWnd, ParamID lengthID, ParamID widthID, TimeValue t, BOOL widthSet)
{
	static BOOL reenter = FALSE;
	if(reenter)
		return;
	reenter = TRUE;
	ISpinnerControl *iSpin = GetISpinner(GetDlgItem(hWnd, IDC_ASPECTSPIN));
	BOOL aspectlocked;
	float length, width;

	if(UseViewOrRenderParams(t) == rbViewport)
		pblock->GetValue(rnd_v2_vpt_aspect_lock,t,aspectlocked,FOREVER);
	else
		pblock->GetValue(rnd_v2_aspect_lock,t,aspectlocked,FOREVER);

	pblock->GetValue(lengthID,t,length,FOREVER);
	pblock->GetValue(widthID,t,width,FOREVER);

	
	if(!aspectlocked)
	{
		CheckAspectLock(t);

		if(width == 0.0f)
		{
			width = EPS;
			//iSpin->SetValue(0.0f, FALSE);
			//iSpin->SetIndeterminate(TRUE);
		}
		else
			iSpin->SetValue(length/width, FALSE);
			
	}
	else
	{
		if(widthSet)
		{
			pblock->SetValue(lengthID,t,mAspect*width);
		}
		else
		{
			if(mAspect == 0.0f)
				mAspect = EPS;
				//pblock->SetValue(widthID,t,0.0f);
			pblock->SetValue(widthID,t,length/mAspect);
		}
	}

	ReleaseISpinner(iSpin);
	reenter = FALSE;
}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:59,代码来源:rendspline.cpp

示例10: UpdateRollup

void MouseDeviceBinding::UpdateRollup(IRollupWindow *iRoll)
   {
   if (iRoll->GetNumPanels()>1) {
      HWND hWnd = iRoll->GetPanelDlg(1);
      CheckDlgButton(hWnd,IDC_MOUSE_X,which==MC_MOUSE_X);
      CheckDlgButton(hWnd,IDC_MOUSE_Y,which==MC_MOUSE_Y);
      CheckDlgButton(hWnd,IDC_MOUSE_FLIP,invert);

      ISpinnerControl *spin = GetISpinner(GetDlgItem(hWnd,IDC_MOUSE_SCALESPIN));
      spin->SetLimits(0.0f, float(999999), FALSE);
      spin->SetScale(0.01f);
      spin->LinkToEdit(GetDlgItem(hWnd,IDC_MOUSE_SCALE), EDITTYPE_FLOAT);
      spin->SetValue(scale,FALSE);
      ReleaseISpinner(spin);
      }
   }
开发者ID:artemeliy,项目名称:inf4715,代码行数:16,代码来源:mcdevice.cpp

示例11: BeginEditParams

void BombObject::BeginEditParams(IObjParam *ip,ULONG flags,Animatable *prev)
	{
	this->ip = ip;
	
	if (!hParam) {
		hSot = ip->AddRollupPage( 
				hInstance, 
				MAKEINTRESOURCE(IDD_BOMB_SOT),
				DefaultSOTProc,
				GetString(IDS_RB_SOT), 
				(LPARAM)ip,APPENDROLL_CLOSED);

		hParam = ip->AddRollupPage( 
				hInstance, 
				MAKEINTRESOURCE(IDD_BOMBPARAMS),
				BombParamProc,
				GetString(IDS_RB_BOMBPARAMS), 
				(LPARAM)this );
	} else {
      DLSetWindowLongPtr(hParam, this);      

		// Init the dialog to our values.
		strengthSpin->SetValue(GetStrength(ip->GetTime()),FALSE);
		gravSpin->SetValue(GetGravity(ip->GetTime()),FALSE );
		chaosSpin->SetValue(GetChaos(ip->GetTime()),FALSE );
		detSpin->SetValue(GetDetonation(ip->GetTime()),FALSE );
		spinSpin->SetValue(GetSpin(ip->GetTime()),FALSE);
		falloffSpin->SetValue(GetFalloff(ip->GetTime()),FALSE);
		minFragSpin->SetValue(GetMinFrag(ip->GetTime()),FALSE);
		maxFragSpin->SetValue(GetMaxFrag(ip->GetTime()),FALSE);
		seedSpin->SetValue(GetSeed(ip->GetTime()),FALSE);
		CheckDlgButton(hParam,IDC_FALLOFF_ON,GetFalloffOn(ip->GetTime()));
		}

	if (GetFalloffOn(ip->GetTime())) {
		NotifyDependents(FOREVER,0,REFMSG_CHANGE);
		ip->RedrawViews(ip->GetTime());
		}
	}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:39,代码来源:bomb.cpp

示例12: LoadDialog

void  OrenNayarShaderDlg::LoadDialog(BOOL draw) 
{
	if (pShader && hRollup) {
		shSpin->SetValue(FracToPc(pShader->GetGlossiness()),FALSE);
		shSpin->SetKeyBrackets(KeyAtCurTime(onb_glossiness));

		ssSpin->SetValue(FracToPc(pShader->GetSpecularLevel()),FALSE);
		ssSpin->SetKeyBrackets(KeyAtCurTime(onb_specular_level));

		softSpin->SetValue(pShader->GetSoftenLevel(),FALSE);
		softSpin->SetKeyBrackets(KeyAtCurTime(onb_soften));

		trSpin->SetValue(FracToPc(pMtl->GetOpacity( curTime )),FALSE);
		trSpin->SetKeyBrackets(pMtl->KeyAtTime(OPACITY_PARAM, curTime));

		dlevSpin->SetValue(FracToPc(pShader->GetDiffuseLevel()),FALSE);
		dlevSpin->SetKeyBrackets(KeyAtCurTime(onb_diffuse_level));

		roughSpin->SetValue(FracToPc(pShader->GetDiffuseRoughness()),FALSE);
		roughSpin->SetKeyBrackets(KeyAtCurTime(onb_roughness));

		CheckButton(hRollup, IDC_LOCK_AD, pShader->GetLockAD() );
		CheckButton(hRollup, IDC_LOCK_DS, pShader->GetLockDS() );
	 	UpdateLockADTex( FALSE ); //don't send to mtl

		BOOL colorSelfIllum = pShader->IsSelfIllumClrOn();
		SetCheckBox(hRollup,IDC_SI_COLORON, colorSelfIllum ); 
		if( colorSelfIllum ) {
//			ShowWindow( siSpin->GetHwnd(), SW_HIDE );
			ShowWindow( GetDlgItem(hRollup, IDC_SI_EDIT), SW_HIDE );
			ShowWindow( GetDlgItem(hRollup, IDC_SI_SPIN), SW_HIDE );

			ShowWindow( cs[N_SI_CLR]->GetHwnd(), SW_SHOW );
		} else {
			// disable the color swatch
			ShowWindow( cs[N_SI_CLR]->GetHwnd(), SW_HIDE );
			// show self-illum slider
//			ShowWindow( siSpin->GetHwnd(), SW_SHOW );
			ShowWindow( GetDlgItem(hRollup, IDC_SI_EDIT), SW_SHOW );
			ShowWindow( GetDlgItem(hRollup, IDC_SI_SPIN), SW_SHOW );

			siSpin->SetValue(FracToPc(pShader->GetSelfIllum()), FALSE);
			siSpin->SetKeyBrackets(KeyAtCurTime(onb_self_illum_amnt));
		}

		UpdateColSwatches();
		UpdateHilite();
	}
}
开发者ID:2asoft,项目名称:xray,代码行数:49,代码来源:shaderonb.cpp

示例13: GetISpinner

//----------------------------------------------------------------------------
BOOL PX2SceneExport::OnStartFrameSpinnerChanged (HWND hWnd)
{
	// start frame
	ISpinnerControl* spinner = GetISpinner(GetDlgItem(hWnd,
		IDC_SPINNER_STARTFRAME)); 
	int startFrame = spinner->GetIVal();
	ReleaseISpinner(spinner);

	// end frame
	spinner = GetISpinner(GetDlgItem(hWnd,IDC_SPINNER_ENDFRAME)); 
	int endFrame = spinner->GetIVal();
	if ( endFrame < startFrame )
		spinner->SetValue(startFrame,FALSE);
	ReleaseISpinner(spinner); 

	return TRUE;
}
开发者ID:ascetic85,项目名称:Phoenix3d,代码行数:18,代码来源:PX2SceneExport.cpp

示例14: OnAspectLock

void RendSpline::OnAspectLock(HWND hWnd, TimeValue t)
{
	BOOL aspectLock;

	if(UseViewOrRenderParams(t) == rbViewport)
		pblock->GetValue(rnd_v2_vpt_aspect_lock,t,aspectLock,FOREVER);
	else
		pblock->GetValue(rnd_v2_aspect_lock,t,aspectLock,FOREVER);

	ISpinnerControl *iSpin = GetISpinner(GetDlgItem(hWnd, IDC_ASPECTSPIN));

	if(aspectLock)
	{	
		if(!mAspectLock)
			mAspect = GetAspect(t,(UseViewOrRenderParams(t)== rbViewport));

		iSpin->SetValue(mAspect,FALSE);
		iSpin->Disable();
		mAspectLock = aspectLock;
	}
	
	ReleaseISpinner(iSpin);
}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:23,代码来源:rendspline.cpp

示例15: BeginEditParams

void OrientConstRotation::BeginEditParams( IObjParam *ip, ULONG flags,Animatable *prev )
{
	if(GetLocked()==false)
	{
		this->ip = ip;
		editCont = this;
		if (flags & BEGIN_EDIT_HIERARCHY) {
			InterpCtrlUI *ui;
			ui = new InterpCtrlUI(NULL,ip,this);
			DWORD f=0;			
			SetProperty(PROPID_INTERPUI,ui);		
		} 
		else {
			orientCD.BeginEditParams(ip, this, flags, prev);
		}

		ip->RegisterTimeChangeCallback(&orientConstTimeChangeCallback);
		orientConstTimeChangeCallback.orient_controller = this;
		
		IParamMap2* pmap = pblock->GetMap();
		if (pmap) hWnd = pmap->GetHWnd();

		if (last_selection < 0){
			RedrawListbox(GetCOREInterface()->GetTime());
		}
		else {
			RedrawListbox(GetCOREInterface()->GetTime(), last_selection);
			ISpinnerControl* spin = GetISpinner(GetDlgItem(hWnd, IDC_ORIENT_CONS_WEIGHT_SPINNER));
			if (spin != NULL){
				float value = pblock->GetFloat(orientation_target_weight, GetCOREInterface()->GetTime(), last_selection);
				spin->SetValue(value, FALSE);
			}
			ReleaseISpinner(spin);

		}
	}
}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:37,代码来源:orientation_cnstrnt.cpp


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