本文整理汇总了C++中ISpinnerControl::Disable方法的典型用法代码示例。如果您正苦于以下问题:C++ ISpinnerControl::Disable方法的具体用法?C++ ISpinnerControl::Disable怎么用?C++ ISpinnerControl::Disable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISpinnerControl
的用法示例。
在下文中一共展示了ISpinnerControl::Disable方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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;
}
}
示例2: 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);
}
示例3: GetISpinner
void
FooControl::set_enable()
{
if (parent_rollout != NULL && parent_rollout->page != NULL)
{
// set spinner enable
ISpinnerControl *spin = GetISpinner(GetDlgItem(parent_rollout->page, control_ID));
if (enabled) spin->Enable();
else spin->Disable();
ReleaseISpinner(spin);
// set editbox enable
ICustEdit *edit = GetICustEdit(GetDlgItem(parent_rollout->page, control_ID+2));
if (enabled) edit->Enable();
else edit->Disable();
ReleaseICustEdit(edit);
// set caption enable
HWND ctrl = GetDlgItem(parent_rollout->page, control_ID+1);
if (ctrl)
EnableWindow(ctrl, enabled);
}
}
示例4: 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);
}
示例5: FaceDataDlgProc
static INT_PTR CALLBACK FaceDataDlgProc (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) {
EditFaceDataMod *em = (EditFaceDataMod *) GetWindowLongPtr (hWnd, GWLP_USERDATA);
ISpinnerControl *spin;
switch (msg) {
case WM_INITDIALOG:
em = (EditFaceDataMod*) lParam;
em->SetDialogHandle (hWnd);
SetWindowLongPtr (hWnd,GWLP_USERDATA,lParam);
spin = GetISpinner(GetDlgItem(hWnd,IDC_VALUE_SPIN));
spin->SetLimits (0.0f, 100.0f, FALSE);
spin->SetScale (0.1f);
spin->LinkToEdit (GetDlgItem(hWnd, IDC_VALUE), EDITTYPE_POS_FLOAT);
spin->SetValue (1.0f, FALSE);
spin->Disable();
ReleaseISpinner(spin);
CheckDlgButton (hWnd, IDC_COLLAPSABLE, em->GetCollapsable());
em->UpdateDialog ();
break;
case CC_SPINNER_BUTTONDOWN:
switch (LOWORD(wParam)) {
case IDC_VALUE_SPIN:
em->ChangeBegin ();
break;
}
break;
case CC_SPINNER_CHANGE:
spin = (ISpinnerControl*)lParam;
switch (LOWORD(wParam)) {
case IDC_VALUE_SPIN:
em->ChangeTo (spin->GetFVal());
break;
}
break;
case CC_SPINNER_BUTTONUP:
switch (LOWORD(wParam)) {
case IDC_VALUE_SPIN:
em->ChangeFinish (HIWORD(wParam) ? true : false);
break;
}
break;
case WM_CUSTEDIT_ENTER:
switch (LOWORD(wParam)) {
case IDC_VALUE:
em->ChangeFinish (true);
break;
}
break;
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDC_RESET_SELECTION:
em->ResetSelection ();
break;
case IDC_COLLAPSABLE:
em->SetCollapsable (IsDlgButtonChecked (hWnd, IDC_COLLAPSABLE)?true:false);
break;
}
break;
case WM_PAINT:
// Good place for call to UpdateDialog, if needed.
return FALSE;
default:
return FALSE;
}
return TRUE;
}