cnc‐ddraw API - FunkyFr3sh/cnc-ddraw GitHub Wiki
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
Currently used in Warcraft II HardwareCursor plugin and Dune2000 1.06p patch
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 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 used for Warcraft II screen recorder "WarVideo"
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 and Icewind Dale 2 EE
Toggle Maximize
#define WM_TOGGLE_MAXIMIZE WM_APP+118
PostMessageA(hwnd, WM_TOGGLE_MAXIMIZE , 0, 0);
Maximize window (Same as Alt+PageDown)