本文整理汇总了C++中ISpinnerControl::Enable方法的典型用法代码示例。如果您正苦于以下问题:C++ ISpinnerControl::Enable方法的具体用法?C++ ISpinnerControl::Enable怎么用?C++ ISpinnerControl::Enable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISpinnerControl
的用法示例。
在下文中一共展示了ISpinnerControl::Enable方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateTypeDlg
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 );
}
示例2: UpdateSpeedTypeDlg
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);
}
示例3: 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;
}
示例4: SetStates
void RandKeysUtil::SetStates()
{
if (doTime) {
iPosTime->Enable();
EnableWindow(GetDlgItem(hWnd,IDC_RANDKEYS_POSTIMELABEL),TRUE);
iNegTime->Enable();
EnableWindow(GetDlgItem(hWnd,IDC_RANDKEYS_NEGTIMELABEL),TRUE);
} else {
iPosTime->Disable();
EnableWindow(GetDlgItem(hWnd,IDC_RANDKEYS_POSTIMELABEL),FALSE);
iNegTime->Disable();
EnableWindow(GetDlgItem(hWnd,IDC_RANDKEYS_NEGTIMELABEL),FALSE);
}
if (doVal) {
iPosVal->Enable();
EnableWindow(GetDlgItem(hWnd,IDC_RANDKEYS_POSVALLABEL),TRUE);
iNegVal->Enable();
EnableWindow(GetDlgItem(hWnd,IDC_RANDKEYS_NEGVALLABEL),TRUE);
} else {
iPosVal->Disable();
EnableWindow(GetDlgItem(hWnd,IDC_RANDKEYS_POSVALLABEL),FALSE);
iNegVal->Disable();
EnableWindow(GetDlgItem(hWnd,IDC_RANDKEYS_NEGVALLABEL),FALSE);
}
switch (iu->GetMajorMode()) {
case TVMODE_EDITKEYS:
case TVMODE_EDITFCURVE:
SetDlgItemText(hWnd,IDC_RANDKEYS_TEXT,
GetString(IDS_RANDKEYS_KEYTEXT));
EnableWindow(GetDlgItem(hWnd,IDC_RANDKEYS_APPLY),TRUE);
break;
case TVMODE_EDITTIME: {
Interval iv = iu->GetTimeSelection();
TSTR buf, start, end;
TimeToString(iv.Start(),start);
TimeToString(iv.End(),end);
buf.printf(GetString(IDS_RANDKEYS_TIMETEXT),start,end);
SetDlgItemText(hWnd,IDC_RANDKEYS_TEXT,buf);
EnableWindow(GetDlgItem(hWnd,IDC_RANDKEYS_APPLY),TRUE);
break;
}
case TVMODE_EDITRANGES:
case TVMODE_POSRANGES:
SetDlgItemText(hWnd,IDC_RANDKEYS_TEXT,_T(""));
EnableWindow(GetDlgItem(hWnd,IDC_RANDKEYS_APPLY),FALSE);
break;
}
}
示例5: 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 );
}
示例6: UpdateInfluenceDlg
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 );
}
示例7: SetCtlByDir
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);
}
}
}
示例8: UpdateMatchDlg
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);
}
示例9: UpdateInheritSpeedDlg
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 );
}
示例10: EnableControls
void BombObject::EnableControls()
{
if (falloffSpin)
{
BOOL fallOffOn;
pblock->GetValue(PB_FALLOFFON, 0, fallOffOn, FOREVER);
falloffSpin->Enable(fallOffOn);
}
}
示例11: UpdateDistinctPointsDlg
void PFOperatorSimplePositionDlgProc::UpdateDistinctPointsDlg( HWND hWnd, int locationType, int useDistinct )
{
BOOL enable = (locationType != kSimplePosition_locationType_pivot);
EnableWindow( GetDlgItem( hWnd, IDC_DISTINCT ), enable );
EnableWindow( GetDlgItem( hWnd, IDC_TOTALTEXT ), enable && (useDistinct != 0));
ISpinnerControl* spin = GetISpinner( GetDlgItem( hWnd, IDC_TOTALDISTINCTSPIN ) );
spin->Enable( enable && (useDistinct != 0));
ReleaseISpinner( spin );
}
示例12: 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);
}
示例13: UpdateSpawnTypeDlg
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);
}
示例14: UpdateVariationDlg
void TestGoToRotationDlgProc::UpdateVariationDlg( HWND hWnd, TimeValue timeVar, float spinVar )
{
bool enable = ((timeVar != 0) || (spinVar != 0.0f));
EnableWindow( GetDlgItem(hWnd, IDC_UNIQUENESSBOX), enable );
EnableWindow( GetDlgItem(hWnd, IDC_SEEDTEXT), enable );
ISpinnerControl* spin = GetISpinner( GetDlgItem( hWnd, IDC_SEEDSPIN ) );
spin->Enable(enable);
ReleaseISpinner(spin);
ICustButton* but = GetICustButton( GetDlgItem( hWnd, IDC_NEW ) );
but->Enable(enable);
ReleaseICustButton(but);
}
示例15: UpdateRandomSeedDlg
void TestSpawnOnCollisionDlgProc::UpdateRandomSeedDlg( HWND hWnd, float affects, float multVar, float speedVar, float divergence, float scaleVar )
{
bool hasChaos = !(((affects==0.0f) || (affects==1.0f)) && (multVar==0.0f) && (speedVar==0.0f) && (divergence==0.0f) && (scaleVar==0.0f));
EnableWindow( GetDlgItem(hWnd, IDC_UNIQUENESSBOX), hasChaos );
EnableWindow( GetDlgItem(hWnd, IDC_SEEDTEXT), hasChaos );
ISpinnerControl* spin = GetISpinner( GetDlgItem( hWnd, IDC_SEEDSPIN ) );
spin->Enable(hasChaos);
ReleaseISpinner(spin);
ICustButton* but = GetICustButton( GetDlgItem( hWnd, IDC_NEW ) );
but->Enable(hasChaos);
ReleaseICustButton(but);
}