[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]#include[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"stdafx.h"
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]class[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] PlantFlagMFD: [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]public[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] MFD {
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]public[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]:
PlantFlagMFD (DWORD w, DWORD h, VESSEL *vessel);
~PlantFlagMFD ();
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]void[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Update (HDC hDC);
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]static[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] MsgProc (UINT msg, UINT mfd, WPARAM wparam, LPARAM lparam);
};
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]static[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]struct[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] {
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] mode;
} g_PlantFlagMFD;
DLLCLBK [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]void[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] opcDLLInit (HINSTANCE hDLL)
{
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]static[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]char[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] *name = [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"PlantFlagMFD"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
MFDMODESPEC spec;
spec.name = name;
spec.key = OAPI_KEY_P;
spec.msgproc = PlantFlagMFD::MsgProc;
g_PlantFlagMFD.mode = oapiRegisterMFDMode (spec);
}
DLLCLBK [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]void[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] opcDLLExit (HINSTANCE hDLL)
{
oapiUnregisterMFDMode (g_PlantFlagMFD.mode);
}
PlantFlagMFD::PlantFlagMFD (DWORD w, DWORD h, VESSEL *vessel)
: MFD (w, h, vessel)
{}
PlantFlagMFD::~PlantFlagMFD ()
{
}
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] PlantFlagMFD::MsgProc (UINT msg, UINT mfd, WPARAM wparam, LPARAM lparam)
{
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]switch[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] (msg) {
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]case[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] OAPI_MSG_MFD_OPENED:
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]return[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] ([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] PlantFlagMFD (LOWORD(wparam), HIWORD(wparam), (VESSEL*)lparam));
}
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]return[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] 0;
}
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]void[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] PlantFlagMFD::Update (HDC hDC)
{
Title (hDC, [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"PlantFlagMFD"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);
}
[/SIZE]