Dege, i've done some quick static analysis on Jane's F18 executable. Not sure, will this help (hope it is) or not, anyway, here we go:
The game consist of two parts (and looks like of two windows):
"wrapper" (gui, mission planning, etc) and "sim" - simulator and rendering part
All VA is from "safedisk-free" executable 1.01f, image base at 0x400000
"sim" window is main window created at .text:00542070 (called from WinMain)
not sure about "wrapper" window, but looks like it created in wrapper.dll - main gui module with heavy mfc usage
window procedure located at .text:00541760 and is relativly small.
on window message 0x500 (sent by PostMessageA call) executed transition from "wrapper" to "sim"
on window message 0x501 (sent by PostMessageA call) executed transition from "sim" to "wrapper"
from "wrapper" to "sim" transition procedure located at .text:00541C70 and calls:
ShowWindow("sim window" handle, SW_SHOW)
UpdateWindow("sim window" handle);
free wrapper stuff
start sim
from "sim" to "wrapper" transition procedure located at .text:00541CF0 and calls:
ShowWindow("sim window" handle, SW_SHOW)
UpdateWindow("sim window" handle);
...
init wrapper stuff
ShowWindow("sim window" handle, SW_HIDE);
Also on window message 0x503 wrapper dlls are initialized. This happends at startup in WinMain:
.text:00540924 push 0
.text:00540926 mov ecx, [ebp+wParam]
.text:00540929 push ecx
.text:0054092A push 503h
.text:0054092F mov edx, main_gui_window
.text:00540935 push edx
.text:00540936 call ds:PostMessageA
On window message 0x504 wrappers stuff uninitialized.
More interesting windows managment in window procedure:
.text:0054182C mov wm_activateapp_flag, ecx
.text:00541832 cmp wm_activateapp_flag, 0
.text:00541839 jnz short loc_54185A
.text:0054183B mov edx, main_gui_window
.text:00541841 push edx ; hWnd
.text:00541842 call ds:IsWindowVisible
.text:00541848 test eax, eax
.text:0054184A jz short loc_54185A
.text:0054184C push 6 ; nCmdShow
.text:0054184E mov eax, main_gui_window
.text:00541853 push eax ; hWnd
.text:00541854 call ds:ShowWindow
case WM_ACTIVATEAPP:
flag = (wParam == 1 || wParam == 2);
if (!flag)
{
if ( IsWindowVisible("sim window" handle) ) ShowWindow("sim window" handle, SW_MINIMIZE);
}
DirectDraw/Direct3D initialized from .text:005728E0 procedure, which is called from some global initialization function (.text:005730C0),
which is called from "start sim" part (.text:00571C30)