Ejemplo n.º 1
0
INT_PTR DBEditorppMenuCommand(WPARAM wParam, LPARAM)
{
	if (!hwnd2mainWindow) { // so only opens 1 at a time
		hRestore = wParam;
		openMainWindow();
	}
	else {
		ShowWindow(hwnd2mainWindow, SW_RESTORE);
		SetForegroundWindow(hwnd2mainWindow);
		if (!hRestore && wParam) {
			hRestore = wParam;
			refreshTree(4);
		}
	}

	if (hTTBButt)
		CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTTBButt, (LPARAM)0);

	return 0;
}
Ejemplo n.º 2
0
// Open one of the window types
McoStatus AllWins::openWindow(MS_WindowTypes type,int32 winNum,void *data,Document *doc)
{
McoStatus state;
MS_WindowTypes t;

switch (type) {
	case Gammut_Dialog1:
	case Gammut_Dialog_Src:
	case Gammut_Dialog_Dst:
		state = OpenGammutDialog(data,type,doc);
		break;
	case Startup_Dialog:
		state = openLogoWin();
		break;
	case PrintWindow:
		state = openMainWindow(doc);
		break;
	case AboutWindow:
		state = openAboutDialog();
		break;
	case StripDialog:
		state = openStripWindow(doc);
		break;
	case CalibDialog:
		state = openCalibWindow(doc);
		break;
	case SelAdjWindow:
		state = openTweakWin(doc);
		break;
	case OptionWindow:
		state = openOptionWin(doc);
		break;
	case CropWindow:
		state = openCropWin(doc);
		break;
	case TechkonWindow:
		state = openTechkonWindow(doc);
		break;
	case TcrWindow:
		state = openTcrWindow(doc);
		break;
	case GretagSLWindow:		
		state = openGTSLWindow(doc);
		break;
	case GretagSCWindow:		
		state = openSpChWindow(doc);
		break;
	case ProcessTherm:
	case ProcessThermClose:
		state = openProcessTherm(doc,type);
		break;
	case GammutSurfaceTherm1:
		state = openGammutSurface1();
		break;
	case GammutSurfaceTherm_Src:
	case GammutSurfaceTherm_Dst:
		state = openGammutSurface2(doc,data,type);
		break;
	case GammutCompTherm:
		state = openGammutCompTherm(doc);
		break;
	case DisplayWindow:
		state = openDisplayWindow(doc,data,winNum);
		break;	
// polaroid window
	case TabbedDocWindow:
		state = openProfDocWin(doc);
		break;
	default: return MCO_UNSUPPORTED_OPERATION;
	}
if (state != MCO_SUCCESS) return state;
// Make the window the front window
return MCO_SUCCESS;
}