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


C++ GetISpinner函数代码示例

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


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

示例1: GetDlgItem

void ConvexApproximationObject::InitUI(HWND hWnd)
{
	m_UI_initalizationCompleted = false;

	HWND maxConcavityUI = GetDlgItem(hWnd, IDC_MAX_CONCAVITY);
	HWND maxConcavitySpinnerUI = GetDlgItem(hWnd, IDC_MAX_CONCAVITY_SPINNER);
	m_maxConcavity = GetICustEdit(maxConcavityUI);
	m_maxConcavitySpinner = GetISpinner (maxConcavitySpinnerUI);
	m_maxConcavitySpinner->LinkToEdit (maxConcavityUI, EDITTYPE_POS_FLOAT);
	m_maxConcavitySpinner->SetScale (0.01f);
	m_maxConcavitySpinner->SetLimits(0.01f, 100.0f);
	m_maxConcavitySpinner->SetValue(m_currentConcavity, TRUE);


	HWND maxSegmentsUI = GetDlgItem(hWnd, IDC_MAX_SEGMENTS);
	HWND maxSegmentsSpinnerUI = GetDlgItem(hWnd, IDC_MAX_SEGMENTS_SPINNER);
	m_maxSegments = GetICustEdit(maxSegmentsUI);
	m_maxSegmentsSpinner = GetISpinner (maxSegmentsSpinnerUI);
	m_maxSegmentsSpinner->LinkToEdit (maxSegmentsUI, EDITTYPE_POS_INT);
	m_maxSegmentsSpinner->SetScale (1.0f);
	m_maxSegmentsSpinner->SetLimits(1, 256);
	m_maxSegmentsSpinner->SetValue(m_currentMaxCount, TRUE);

	m_UI_initalizationCompleted = true;
}
开发者ID:Hurleyworks,项目名称:newton-dynamics,代码行数:25,代码来源:ConvexApproximation.cpp

示例2: CheckDlgButton

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

示例3: EnableWindow

void TestSplitByAmountDlgProc::UpdateTypeDlg( HWND hWnd, int type )
{
	bool enable = (type == kSplitByAmount_testType_fraction);
	bool bRandom = enable;
	EnableWindow( GetDlgItem( hWnd, IDC_RATIOTEXT ), enable );
	ISpinnerControl* spin = GetISpinner( GetDlgItem( hWnd, IDC_RATIO2SPIN ) );
	spin->Enable( enable );
	ReleaseISpinner( spin );

	enable = (type == kSplitByAmount_testType_everyN);
	EnableWindow( GetDlgItem( hWnd, IDC_EVERYNTEXT ), enable );
	spin = GetISpinner( GetDlgItem( hWnd, IDC_EVERYNSPIN ) );
	spin->Enable( enable );
	ReleaseISpinner( spin );

	enable = (type >= kSplitByAmount_testType_firstN);
	EnableWindow( GetDlgItem( hWnd, IDC_FIRSTNTEXT ), enable );
	EnableWindow( GetDlgItem( hWnd, IDC_PERSOURCE ), enable );
	spin = GetISpinner( GetDlgItem( hWnd, IDC_FIRSTNSPIN ) );
	spin->Enable( enable );
	ReleaseISpinner( spin );

	EnableWindow( GetDlgItem( hWnd, IDC_UNIQUENESSBOX ), bRandom );
	EnableWindow( GetDlgItem( hWnd, IDC_SEEDTEXT ), bRandom );
	spin = GetISpinner( GetDlgItem( hWnd, IDC_SEEDSPIN ) );
	spin->Enable( bRandom );
	ReleaseISpinner( spin );
	ICustButton* button = GetICustButton( GetDlgItem( hWnd, IDC_NEW ) );
	button->Enable( bRandom );
	ReleaseICustButton( button );
}
开发者ID:DimondTheCat,项目名称:xray,代码行数:31,代码来源:PFTestSplitByAmount_ParamBlock.cpp

示例4: 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

示例5: GetISpinner

void TestSpawnOnCollisionDlgProc::UpdateSpeedTypeDlg( HWND hWnd, int speedType )
{
	ISpinnerControl* spin = GetISpinner( GetDlgItem( hWnd, IDC_SPEEDSPIN ) );
	spin->Enable(speedType == kSpawnCollision_speedType_units);
	ReleaseISpinner(spin);
	spin = GetISpinner( GetDlgItem( hWnd, IDC_INHERITEDSPIN ) );
	spin->Enable(speedType == kSpawnCollision_speedType_inherited);
	ReleaseISpinner(spin);
}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:9,代码来源:PFTestSpawnOnCollision_ParamBlock.cpp

示例6: GetISpinner

//----------------------------------------------------------------------------
BOOL PX2SceneExport::OnEnableFrameSpinners (HWND hWnd, BOOL bEnabled)
{
	ISpinnerControl* spinner = GetISpinner(GetDlgItem(hWnd,
		IDC_SPINNER_STARTFRAME)); 
	spinner->Enable(bEnabled);
	ReleaseISpinner(spinner); 
	spinner = GetISpinner(GetDlgItem(hWnd, IDC_SPINNER_ENDFRAME)); 
	spinner->Enable(bEnabled);
	return TRUE;
}
开发者ID:ascetic85,项目名称:Phoenix3d,代码行数:11,代码来源:PX2SceneExport.cpp

示例7: EnableWindow

void PFOperatorInstanceShapeDlgProc::UpdateScaleDlg( HWND hWnd, BOOL setScale)
{
	ISpinnerControl *spin;
	bool enable = (setScale != 0);

	EnableWindow( GetDlgItem( hWnd, IDC_VARIATIONTEXT ), enable );
	spin = GetISpinner( GetDlgItem( hWnd, IDC_PARTICLESCALESPIN ) );
	spin->Enable( enable );
	ReleaseISpinner( spin );
	spin = GetISpinner( GetDlgItem( hWnd, IDC_VARIATIONSPIN ) );
	spin->Enable( enable );
	ReleaseISpinner( spin );
}
开发者ID:artemeliy,项目名称:inf4715,代码行数:13,代码来源:PFOperatorInstanceShape_ParamBlock.cpp

示例8: GetISpinner

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

示例9: GetISpinner

void RendSpline::CheckAspectLock(TimeValue t)
{
	ParamID lengthID;
	ParamID widthID;
	ParamID aspectlockID;
	float length, width, aspect = 1.0f;
	BOOL aspectlocked = FALSE;

	if(UseViewOrRenderParams(t) == rbViewport)
	{
		widthID = rnd_v2_vpt_width;
		lengthID = rnd_v2_vpt_length;
		aspectlockID = rnd_v2_vpt_aspect_lock;
	}
	else
	{
		widthID = rnd_v2_width;
		lengthID = rnd_v2_length;
		aspectlockID = rnd_v2_aspect_lock;
	}
	pblock->GetValue(lengthID,t,length,FOREVER);
	pblock->GetValue(widthID,t,width,FOREVER);
	pblock->GetValue(aspectlockID,t,aspectlocked,FOREVER);	

	IParamMap2 *map = pblock->GetMap(0);

	if(map)
	{
		ISpinnerControl *iSpin = GetISpinner(GetDlgItem(map->GetHWnd(), IDC_ASPECTSPIN));
		aspect = iSpin->GetFVal();
	}

	pblock->GetMap()->Enable(aspectlockID,((length != 0.0f && width != 0.0f && aspect != 0.0f) || aspectlocked));
}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:34,代码来源:rendspline.cpp

示例10: NumMapsDlgProc

static INT_PTR CALLBACK NumMapsDlgProc(
		HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
	{
	switch (msg) {
		case WM_INITDIALOG: {
			ISpinnerControl *spin = 
				SetupIntSpinner(
					hWnd,IDC_COMP_NUMMAPSSPIN,IDC_COMP_NUMMAPS,
					2,1000,(int)lParam);
			ReleaseISpinner(spin);
			CenterWindow(hWnd,GetParent(hWnd));
			break;
			}

		case WM_COMMAND:
			switch (LOWORD(wParam)) {
				case IDOK: {
					ISpinnerControl *spin = 
						GetISpinner(GetDlgItem(hWnd,IDC_COMP_NUMMAPSSPIN));
					EndDialog(hWnd,spin->GetIVal());
					ReleaseISpinner(spin);
					break;
					}

				case IDCANCEL:
					EndDialog(hWnd,-1);
					break;
				}
			break;

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

示例11: FixHeight

void FixHeight(IParamBlock *pblock,TimeValue t,HWND hWnd,BOOL increate)
{ float radius,height,r2,minh;
  BOOL con,minush;

	pblock->GetValue(PB_RADIUS,t,radius,FOREVER);
	pblock->GetValue(PB_CENTERS,t,con,FOREVER);
	pblock->GetValue(PB_HEIGHT,(increate?0:t),height,FOREVER);
	r2=2.0f*radius;
	minush=height<0.0f;
	minh=((minush)?-r2:r2);
	height=(float)fabs(height);
	if (con) height+=r2;
	if (hWnd)
    { ISpinnerControl *spin2 = GetISpinner(GetDlgItem(hWnd,IDC_SC_HEIGHTSPIN));
	  if (minush) spin2->SetLimits(MIN_HEIGHT,minh);
	  else spin2->SetLimits(minh,BMAX_HEIGHT,FALSE);
	  ReleaseISpinner(spin2);
	}
//O.Z. *** begin fix for bug# 175299
	if (height<r2)  
		pblock->SetValue(PB_HEIGHT,(increate?0:t),minh+DEF_HEIGHT);
	else if ( (fabs(height)-fabs(2.0f * radius)) <= .001f)
		pblock->SetValue(PB_HEIGHT,(increate?0:t),(height+DEF_HEIGHT));
//O.Z. *** end bug fix

}
开发者ID:artemeliy,项目名称:inf4715,代码行数:26,代码来源:scuba.cpp

示例12: EnableWindow

void PFOperatorForceSpaceWarpDlgProc::UpdateInfluenceDlg( HWND hWnd, bool enable )
{
	EnableWindow( GetDlgItem( hWnd, IDC_INFLUENCETEXT), enable );
	ISpinnerControl* spin = GetISpinner( GetDlgItem( hWnd, IDC_INFLUENCESPIN ) );
	spin->Enable(enable);
	ReleaseISpinner( spin );
}
开发者ID:whztt07,项目名称:OgreGameProject,代码行数:7,代码来源:PFOperatorForceSpaceWarp_ParamBlock.cpp

示例13: TurnSpinner

		void TurnSpinner(HWND hWnd,int SpinNum,BOOL ison)
			{	
			ISpinnerControl *spin2 = GetISpinner(GetDlgItem(hWnd,SpinNum));
			if (ison) spin2->Enable();else spin2->Disable();
			ReleaseISpinner(spin2);

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

示例14: SetupMtlSubNameCombo

void MaterialUIHandler::ValidateUINameCombo (HWND hWnd, EPolyMod *pMod) {
	SetupMtlSubNameCombo (hWnd, pMod);
	ISpinnerControl* spin = NULL;
	spin = GetISpinner(GetDlgItem(hWnd,IDC_MAT_IDSPIN));
	if (spin) UpdateNameCombo (hWnd, spin);
	ReleaseISpinner(spin);
}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:7,代码来源:EditPolyUISurface.cpp

示例15: GetICustEdit

void EllipseObject::UpdateUI(HWND hwnd)
{
	Interval valid;
	BOOL build_outine = FALSE;
	TimeValue t = ip? ip->GetTime() : 0;

	myParamBlock->GetValue(PB_OUTLINE, t, build_outine, valid);
	ICustEdit *thickness_edit = GetICustEdit(GetDlgItem(hwnd, IDC_THICKNESSEDIT));
	ISpinnerControl *thickness_spin = GetISpinner(GetDlgItem(hwnd, IDC_THICKSPINNER));

	if(!thickness_edit || !thickness_spin)
		return;

	if(build_outine)
	{
		EnableWindow(GetDlgItem(hwnd,IDC_THICKNESS_TEXT),TRUE);
		thickness_edit->Enable();
		thickness_spin->Enable();
	}
	else
	{
		EnableWindow(GetDlgItem(hwnd,IDC_THICKNESS_TEXT),FALSE);
		thickness_edit->Disable();
		thickness_spin->Disable();
	}

	ReleaseICustEdit(thickness_edit);
	ReleaseISpinner(thickness_spin);
}
开发者ID:artemeliy,项目名称:inf4715,代码行数:29,代码来源:ellipse.cpp


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