本文整理汇总了C++中ISpinnerControl::SetIndeterminate方法的典型用法代码示例。如果您正苦于以下问题:C++ ISpinnerControl::SetIndeterminate方法的具体用法?C++ ISpinnerControl::SetIndeterminate怎么用?C++ ISpinnerControl::SetIndeterminate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISpinnerControl
的用法示例。
在下文中一共展示了ISpinnerControl::SetIndeterminate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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);
}
示例2: UpdateCurrentMaterial
void MaterialUIHandler::UpdateCurrentMaterial (HWND hWnd, EPolyMod *pMod, TimeValue t, Interval & validity)
{
MtlID mat = 0;
bool determined = false;
if (pMod->GetPolyOperationID() == ep_op_set_material)
{
int materialHolder;
pMod->getParamBlock()->GetValue (epm_material, t, materialHolder, validity);
mat = materialHolder;
determined = true;
}
else
{
bool useStackSelection = pMod->getParamBlock()->GetInt (epm_stack_selection) != 0;
bool init = false;
ModContextList list;
INodeTab nodes;
pMod->EpModGetIP()->GetModContexts (list, nodes);
int i;
for (i=0; i<list.Count(); i++)
{
EditPolyData *pData = (EditPolyData *) list[i]->localData;
if (!pData) continue;
MNMesh *pMesh = pData->GetMesh();
if (!pMesh) {
validity = NEVER;
continue;
}
DWORD l_selFlag = useStackSelection ? MN_EDITPOLY_STACK_SELECT:MN_SEL;
int j;
for (j=0; j<pMesh->numf; j++)
{
if (!pMesh->f[j].GetFlag (l_selFlag))
continue;
if (pMesh->f[j].GetFlag (MN_DEAD))
continue;
if (!init)
{
mat = pMesh->f[j].material;
init = true;
}
else if (mat != pMesh->f[j].material) break;
}
if (j<pMesh->numf) break;
}
nodes.DisposeTemporary ();
determined = (i>=list.Count()) && init;
}
ISpinnerControl *spin = GetISpinner(GetDlgItem(hWnd,IDC_MAT_IDSPIN));
spin->SetIndeterminate(!determined);
if (determined) spin->SetValue (int(mat+1), FALSE);
ReleaseISpinner(spin);
spin = GetISpinner(GetDlgItem(hWnd,IDC_MAT_IDSPIN_SEL));
spin->SetIndeterminate(!determined);
if (determined) spin->SetValue (int(mat+1), FALSE);
ReleaseISpinner(spin);
if (GetDlgItem (hWnd, IDC_MTLID_NAMES_COMBO)) {
ValidateUINameCombo(hWnd, pMod);
}
}