greetings to all. i'm an ff8 lover and ive been trying to make my own ff8 window mode app. i know ff8w does the job but i'd like window mode to be part of my app which will do other stuff in the future.
i opened ff8w.exe in IDA and this is what ive recreated in c++
//shellexecute..
//waitforinputidle..
HWND FF8Wnd = FindWindow("DEFAULT CLASS", NULL);
ShowWindow(FF8Wnd, 0);
RECT Rect;
GetWindowRect(FF8Wnd, &Rect);
Rect.right = GetSystemMetrics(SM_CXSIZEFRAME) + 2;
Rect.left = (GetSystemMetrics(SM_CXSCREEN) - Rect.right) / 2;
Rect.bottom = Rect.bottom + GetSystemMetrics(SM_CYCAPTION) + GetSystemMetrics(SM_CYFRAME) + 1;
Rect.top = (GetSystemMetrics(SM_CYSCREEN) - Rect.bottom) / 2;
SetWindowPos(FF8Wnd, HWND_TOPMOST, Rect.left, Rect.top, Rect.right, Rect.bottom, 0x40);
when i run my app, a black window that's not fullscreen did appear for 1 second before the game became fullscreen and showed the sq soft intro. guess i wrongly assumed that dx scales the game to window size. am i missing certain things? must i also hook ddraw&d3d?
here's a copy of ff8w if it helps at all,
http://www.filesend.net/download.php?f=5950ed718535736e59ee81f11d0ca5fethanks in advance
edit:
if ddraw&d3d hooking is required, please state the relevant functions if it isnt too much work.
i'm unfamiliar with dx so here are my guesses, that ff8 uses ddraw for background and d3d for models?
ddraw's createsurface, and Lock() <-- to draw overlays
d3d's setviewport maybe?
thanks again!