Ejemplo n.º 1
0
DLLCLBK void InitModule (HINSTANCE hDLL)
{
	g_hInst = hDLL; // remember the instance handle

	// To allow the user to open our new dialog box, we create
	// an entry in the "Custom Functions" list which is accessed
	// in Orbiter via Ctrl-F4.
	g_dwCmd = oapiRegisterCustomCmd ("External MFD",
		"Opens a multifunctional display in an external window",
		OpenDlgClbk, NULL);

	// Load the bitmap for the "pin" title button
	g_hPin = (HBITMAP)LoadImage (g_hInst, MAKEINTRESOURCE(IDB_PIN), IMAGE_BITMAP, 15, 30, 0);

	// Register a window classes for the MFD display and buttons
	WNDCLASS wndClass;
	wndClass.style = CS_HREDRAW | CS_VREDRAW;
	wndClass.lpfnWndProc   = MFD_WndProc;
	wndClass.cbClsExtra    = 0;
	wndClass.cbWndExtra    = 0;
	wndClass.hInstance     = hDLL;
	wndClass.hIcon         = NULL;
	wndClass.hCursor       = LoadCursor (NULL, MAKEINTRESOURCE(IDC_ARROW));
	wndClass.hbrBackground = (HBRUSH)GetStockObject (BLACK_BRUSH);
	wndClass.lpszMenuName  = NULL;
	wndClass.lpszClassName = "ExtMFD_Display";
	RegisterClass (&wndClass);

	wndClass.lpfnWndProc   = MFD_BtnProc;
	wndClass.hbrBackground = (HBRUSH)GetStockObject (LTGRAY_BRUSH);
	wndClass.lpszClassName = "ExtMFD_Button";
	RegisterClass (&wndClass);
}
Ejemplo n.º 2
0
MGAFinder::MGAFinder(HINSTANCE hDLL)
{
	hInst = hDLL;
	hDlg = NULL;

	dwCmd = oapiRegisterCustomCmd(
		"Find Optimal MGA Solution",
		"Define and execute Multiple Gravity Assist optimization task",
		::OpenDialog, this);

	g_optimizer->Update(hDlg);
}