Example #1
0
INT_PTR RendSplineParamsMapDlgProc::DlgProc(
		TimeValue t,IParamMap2 *map,HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
			
{

switch (msg) {
	case WM_INITDIALOG:
        mhWnd = hWnd;
		Initialize(hWnd,t);
		Update(hWnd,t);
        UpdateRWS();
		break;
	case CC_SPINNER_CHANGE:			
		{
		int id = LOWORD(wParam);
		ISpinnerControl *iSpin = (ISpinnerControl*)lParam;
		BOOL isViewport = (mod->UseViewOrRenderParams(t) == rbViewport);
		//if (!theHold.Holding()) theHold.Begin();
		//BOOL redraw = TRUE;
		switch ( id ) {
			case IDC_ASPECTSPIN:
			{
			if (isViewport)
					mod->OnSetAspect(hWnd,t, rnd_v2_vpt_width, rnd_v2_vpt_length);
			else
					mod->OnSetAspect(hWnd,t, rnd_v2_width, rnd_v2_length );
					
			}
			}
		return TRUE;
		}

   case WM_COMMAND:
       switch (LOWORD(wParam)) {
       case IDC_GENMAPPING:
           UpdateRWS();
		break;

       case IDC_REAL_WORLD_MAP_SIZE: {
           BOOL check = IsDlgButtonChecked(hWnd, IDC_REAL_WORLD_MAP_SIZE);
		theHold.Begin();
           mod->SetUsePhysicalScaleUVs(check);
           theHold.Accept(GetString(IDS_PARAM_CHANGE));
       }
     }
     break;

}
return FALSE;
}
Example #2
0
INT_PTR ExtrudeDlgProc::DlgProc(
		TimeValue t,IParamMap *map,
		HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
	{
	switch (msg) {
    case WM_INITDIALOG: {
            mhWnd = hWnd;
			EnableWindow(GetDlgItem(hWnd,IDC_USE_SHAPE_IDS),mod->GetGenMatIDs());
            UpdateRWS();
#ifdef XXDESIGN_VER
			//JH 6/24/99
			//In the design version we may be outputting a solid
			//If so we don't allow changing output types
			int output;
			mod->pblock->GetValue(5/*PB_OUTPUT*/, TimeValue(0), output, FOREVER);
			if(output == AMSOLID_OUTPUT)
			{
			EnableWindow(GetDlgItem(hWnd,IDC_PATCH),FALSE);
			EnableWindow(GetDlgItem(hWnd,IDC_MESH), FALSE);
			EnableWindow(GetDlgItem(hWnd,IDC_NURBS),FALSE);
			}
#endif
    }
			break;
		case WM_COMMAND:
			switch (LOWORD(wParam)) {
                case IDC_GENMAPPING:
                    UpdateRWS();
                    break;

				case IDC_GEN_MATIDS:
					EnableWindow(GetDlgItem(hWnd,IDC_USE_SHAPE_IDS),mod->GetGenMatIDs());
					break;
                case IDC_REAL_WORLD_MAP_SIZE: {
                    BOOL check = IsDlgButtonChecked(hWnd, IDC_REAL_WORLD_MAP_SIZE);
                    theHold.Begin();
                    mod->SetUsePhysicalScaleUVs(check);
                    theHold.Accept(GetString(IDS_PARAM_CHANGE));
                }
				}
			break;
		}
	return FALSE;
	}