Notifications
Clear all

[Closed] ISpinnerControl and CC_SPINNER_CHANGE

I am trying to use CC_SPINNER_CHANGE but it is never called. I saw the other Thread on it, but I seem to have the same values so can’t understand why its not beening called.

Inside my DlgProc is the CC_SPINNER_CHANGE

case CC_SPINNER_CHANGE:{
 			ExecuteMAXScriptScript(_T("\"hello c++\""), 0, 0);
 			break;
 			}

Then within another Script, is where I have set up my ISpinnerControl.

CountStart = GetISpinner(GetDlgItem(hName, IDC_START_SPIN));
 	CountStart->SetScale(1.0f);
 	CountStart->SetLimits(-10000, 10000000);
 	CountStart->LinkToEdit(GetDlgItem(hName, IDC_START_FRAME), EDITTYPE_INT);
 
 	CountEnd = GetISpinner(GetDlgItem(hName, IDC_END_SPIN));
 	CountEnd->SetScale(1.0f);
 	CountEnd->SetLimits(-10000, 10000000);
 	CountEnd->LinkToEdit(GetDlgItem(hName, IDC_END_FRAME), EDITTYPE_INT);
 

But when I click on either of the spinners, nothing is being called. I have tried putting the Spinner controls inside of the main script, but still no luck. The RC code for my spinners is below

CONTROL		 "",IDC_START_FRAME,"CustEdit",WS_TABSTOP,138,100,28,11
 	CONTROL		 "",IDC_START_SPIN,"SpinnerControl",0x0,166,100,10,11

Anyone know why this isn’t being called ??

4 Replies

first of all fix the mxs script you want to execute. it should be MSTR and must be executable…

second is to check that any other message that has to be for sure (WM_INITDIALOG for example) sends

at what “level” are you trying to catch the “message” ? Don’t try and catch it as sub WM_COMMAND message

I use that too to spit stuff to the script listener just to see if it hits the function.

ExecuteMAXScriptScript(_T(““hello c++””), 0, 0);


ExecuteMAXScriptScript(_T("\"hello c++\""), 0, 0);

I know it should be this

swprintf(str, _T(" %i 
"), num);
mprintf(str);
mflush();

Ahh I was missing the Print on my ExecuteMAXScriptScript … Silly me Thank you for all the help, got it working now