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


C++ ISpinnerControl类代码示例

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


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

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

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

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

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

示例5: EnableWindow

void TestGoToRotationDlgProc::UpdateMatchDlg( HWND hWnd, int matchSpin )
{
	bool enable = (matchSpin == 0);
	EnableWindow( GetDlgItem(hWnd, IDC_SPINTEXT), enable );
	ISpinnerControl* spin = GetISpinner( GetDlgItem( hWnd, IDC_SPINRATESPIN ) );
	spin->Enable(enable);
	ReleaseISpinner(spin);
}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:8,代码来源:PFTestGoToRotation_ParamBlock.cpp

示例6: EnableWindow

void PFOperatorSimplePositionDlgProc::UpdateInheritSpeedDlg( HWND hWnd, BOOL lock, BOOL inherit )
{
	EnableWindow( GetDlgItem( hWnd, IDC_INHERIT ), !lock );
	bool useInherit = ((lock == 0) && (inherit != 0));
	EnableWindow( GetDlgItem( hWnd, IDC_MULTIPLIERTEXT ), useInherit);
	ISpinnerControl* spin = GetISpinner( GetDlgItem( hWnd, IDC_MULTIPLIERSPIN ) );
	spin->Enable(useInherit);
	ReleaseISpinner( spin );
}
开发者ID:DimondTheCat,项目名称:xray,代码行数:9,代码来源:PFOperatorSimplePosition_ParamBlock.cpp

示例7: MouseDeviceDlgProc

static INT_PTR CALLBACK MouseDeviceDlgProc(
      HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
   {
   IMCParamDlg *dlg = DLGetWindowLongPtr<IMCParamDlg*>(hWnd);
   if (!dlg && msg!=WM_INITDIALOG) return FALSE;

   switch (msg) {
      case WM_INITDIALOG:
         dlg = (IMCParamDlg*)lParam;
         dlg->binding->UpdateRollup(dlg->iRoll);
         DLSetWindowLongPtr(hWnd, lParam);
         break;

      case WM_COMMAND:
         switch (LOWORD(wParam)) {
            case IDC_MOUSE_X: {
               MouseDeviceBinding *b = (MouseDeviceBinding*)dlg->binding;
               b->which = MC_MOUSE_X;
               b->NotifyDependents(FOREVER,0,REFMSG_CHANGE);
               break;
               }

            case IDC_MOUSE_Y: {
               MouseDeviceBinding *b = (MouseDeviceBinding*)dlg->binding;
               b->which = MC_MOUSE_Y;
               b->NotifyDependents(FOREVER,0,REFMSG_CHANGE);
               break;
               }

            case IDC_MOUSE_FLIP: {
               MouseDeviceBinding *b = (MouseDeviceBinding*)dlg->binding;
               b->invert = IsDlgButtonChecked(hWnd,IDC_MOUSE_FLIP);
               b->NotifyDependents(FOREVER,0,REFMSG_CHANGE);
               break;
               }
            }
         break;

      case CC_SPINNER_CHANGE: {
         ISpinnerControl *spin = (ISpinnerControl *)lParam;
         MouseDeviceBinding *b = (MouseDeviceBinding*)dlg->binding;
         b->scale = spin->GetFVal();
         b->NotifyDependents(FOREVER,0,REFMSG_CHANGE);
         break;
         }

      case WM_LBUTTONDOWN:
      case WM_LBUTTONUP:
      case WM_MOUSEMOVE:            
            dlg->iRoll->DlgMouseMessage(hWnd,msg,wParam,lParam);
         break; 

      default:
         return FALSE;
      }
   return TRUE;
   }
开发者ID:artemeliy,项目名称:inf4715,代码行数:57,代码来源:mcdevice.cpp

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

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

示例10: EnableWindow

void TestSpawnOnCollisionDlgProc::UpdateSpawnTypeDlg( HWND hWnd, int spawnType, int deleteParent )
{
	bool multType = (spawnType == kSpawnCollision_spawnType_multiple);
	bool sentParent = (multType || (deleteParent == 0));
	EnableWindow( GetDlgItem(hWnd, IDC_PARTICLESCOLLIDED), sentParent );
	EnableWindow( GetDlgItem(hWnd, IDC_DELETEPARENT), spawnType == kSpawnCollision_spawnType_once );
	EnableWindow( GetDlgItem(hWnd, IDC_UNTILTEXT), multType);
	ISpinnerControl* spin = GetISpinner( GetDlgItem( hWnd, IDC_UNTILSPIN ) );
	spin->Enable(multType);
	ReleaseISpinner(spin);
}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:11,代码来源:PFTestSpawnOnCollision_ParamBlock.cpp

示例11: UpdateScaleDlg

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

示例12: EnableWindow

void PFOperatorSimpleOrientationDlgProc::SetCtlByDir(IParamMap2* map, HWND hWnd)
{
	BOOL bEulerSpinOn = false;
	if(map && hWnd) {
		IParamBlock2* ppb = map->GetParamBlock();
		if(ppb) {
			int iDir = ppb->GetInt(kSimpleOrientation_direction, 0);
			if((iDir == kSO_World) || (iDir == kSO_Speed) || (iDir == kSO_SpeedFollow))
				bEulerSpinOn = true;

			EnableWindow(GetDlgItem(hWnd, IDC_XTEXT), bEulerSpinOn);
			ISpinnerControl* psc = GetISpinner(GetDlgItem(hWnd, IDC_XSPIN));
			psc->Enable(bEulerSpinOn);
			ReleaseISpinner(psc);
			EnableWindow(GetDlgItem(hWnd, IDC_YTEXT), bEulerSpinOn);
			psc = GetISpinner(GetDlgItem(hWnd, IDC_YSPIN));
			psc->Enable(bEulerSpinOn);
			ReleaseISpinner(psc);
			EnableWindow(GetDlgItem(hWnd, IDC_ZTEXT), bEulerSpinOn);
			psc = GetISpinner(GetDlgItem(hWnd, IDC_ZSPIN));
			psc->Enable(bEulerSpinOn);
			ReleaseISpinner(psc);
			bool bDivergenceAvailable = ((iDir != kSO_Rand_3D) && (iDir != kSO_SpeedFollow));
			EnableWindow(GetDlgItem(hWnd, IDC_DIVERGENCETEXT), bDivergenceAvailable);
			psc = GetISpinner(GetDlgItem(hWnd, IDC_DIVERGENCESPIN));
			psc->Enable(bDivergenceAvailable);
			ReleaseISpinner(psc);
			
			EnableWindow(GetDlgItem(hWnd, IDC_RESTRICTTOAXIS), bDivergenceAvailable);
			bool bRestrictToAxis = (ppb->GetInt(kSimpleOrientation_restrictToAxis, 0) != 0) && bDivergenceAvailable;
			EnableWindow(GetDlgItem(hWnd, IDC_DIVERGENCEAXISBOX), bRestrictToAxis);
			EnableWindow(GetDlgItem(hWnd, IDC_AXISXTEXT), bRestrictToAxis);
			psc = GetISpinner(GetDlgItem(hWnd, IDC_AXISXSPIN));
			psc->Enable(bRestrictToAxis);
			ReleaseISpinner(psc);
			EnableWindow(GetDlgItem(hWnd, IDC_AXISYTEXT), bRestrictToAxis);
			psc = GetISpinner(GetDlgItem(hWnd, IDC_AXISYSPIN));
			psc->Enable(bRestrictToAxis);
			ReleaseISpinner(psc);
			EnableWindow(GetDlgItem(hWnd, IDC_AXISZTEXT), bRestrictToAxis);
			psc = GetISpinner(GetDlgItem(hWnd, IDC_AXISZSPIN));
			psc->Enable(bRestrictToAxis);
			ReleaseISpinner(psc);

			bool bChaosAvailable = (iDir != kSO_SpeedFollow);
			EnableWindow(GetDlgItem(hWnd, IDC_UNIQUENESSBOX), bChaosAvailable);
			EnableWindow(GetDlgItem(hWnd, IDC_SEEDTEXT), bChaosAvailable);
			psc = GetISpinner(GetDlgItem(hWnd, IDC_SEEDSPIN));
			psc->Enable(bChaosAvailable);
			ReleaseISpinner(psc);
			ICustButton* but = GetICustButton(GetDlgItem(hWnd, IDC_NEW));
			but->Enable(bChaosAvailable);
			ReleaseICustButton(but);
		}
	}
}
开发者ID:artemeliy,项目名称:inf4715,代码行数:56,代码来源:PFOperatorSimpleOrientation_ParamBlock.cpp

示例13: UpdateVariationDlg

void TestDurationDlgProc::UpdateVariationDlg( HWND hWnd, TimeValue variation )
{
	bool useRandom = (variation != 0);
	ISpinnerControl* spin;

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

示例14: CheckAspectLock

void RendSpline::OnSetAspect(HWND hWnd, TimeValue t, ParamID widthID, ParamID lengthID)
{
	CheckAspectLock(t);

	ISpinnerControl *iSpin = GetISpinner(GetDlgItem(hWnd, IDC_ASPECTSPIN));
	mAspect = iSpin->GetFVal();

	float width;

	pblock->GetValue(widthID,t,width,FOREVER);
	pblock->SetValue(lengthID,t,mAspect*width);

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

示例15: UpdateAnimatedSahpeDlg

void PFOperatorInstanceShapeDlgProc::UpdateAnimatedSahpeDlg( HWND hWnd, BOOL animatedShape, BOOL addRandomOffset )
{
	ISpinnerControl *spin;
	BOOL enableOffset = animatedShape && addRandomOffset;

	EnableWindow( GetDlgItem( hWnd, IDC_ACQUIRE ), !animatedShape );
	EnableWindow( GetDlgItem( hWnd, IDC_SYNCFRAME ), animatedShape );
	EnableWindow( GetDlgItem( hWnd, IDC_SYNCBYTEXT ), animatedShape );
	EnableWindow( GetDlgItem( hWnd, IDC_SYNC ), animatedShape );
	EnableWindow( GetDlgItem( hWnd, IDC_SYNCRANDOM ), animatedShape );
	EnableWindow( GetDlgItem( hWnd, IDC_SYNCOFFSET ), enableOffset );
	spin = GetISpinner( GetDlgItem( hWnd, IDC_SYNCOFFSETSPIN ) );
	spin->Enable( enableOffset );
	ReleaseISpinner( spin );
}
开发者ID:whztt07,项目名称:OgreGameProject,代码行数:15,代码来源:PFOperatorInstanceShape_ParamBlock.cpp


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