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

DDIsWindowed

BOOL DDIsWindowed()

Returns TRUE if the application is currently running in windowed mode

Note: Borderless counts as fullscreen

 

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()

DDEnableZoom must be called before each SetDisplayMode call to allow zooming (Change application resolution without altering the window size)

 

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)

 

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