Skip to content
FunkyFr3sh edited this page Aug 20, 2024 · 10 revisions

DDIsWindowed

BOOL DDIsWindowed()

Returns TRUE if the application is currently running in windowed mode

Note: Borderless counts as fullscreen

Currently used in EV Nova CE and Icewind Dale 2 EE

 

DDGetProcAddress

FARPROC WINAPI DDGetProcAddress(HMODULE hModule, LPCSTR lpProcName)

Same as GetProcAddress @ Kernel32.dll but allows to bypass all cnc-ddraw hooks to obtain the pointer to the real function

 

DDEnableZoom

void DDEnableZoom()

Change application resolution without altering the window size.

Note: DDEnableZoom must be called before each SetDisplayMode call.

Currently used in Age of Empires II: The Conquerors Widescreen patch

 

GameHandlesClose

BOOL GameHandlesClose

If enabled, cnc-ddraw will not _exit(0) on SC_CLOSE (Same as game_handles_close= in ddraw.ini)

 

pvBmpBits

void* pvBmpBits

Pointer to DIB bit values of the fake primary surface (Currently only used for Warcraft II screen recorder)

 

Toggle Fullscreen

#define WM_TOGGLE_FULLSCREEN WM_APP+117

#define CNC_DDRAW_SET_FULLSCREEN 1

#define CNC_DDRAW_SET_WINDOWED 2

 

PostMessageA(hwnd, WM_TOGGLE_FULLSCREEN, CNC_DDRAW_SET_WINDOWED, 0);

Switch between windowed and fullscreen modes (Similar to Alt+Enter)

Currently used in EV Nova CE

 

Toggle Maximize

#define WM_TOGGLE_MAXIMIZE WM_APP+118

 

PostMessageA(hwnd, WM_TOGGLE_MAXIMIZE , 0, 0);

Maximize window (Same as Alt+PageDown)

Clone this wiki locally