-
Notifications
You must be signed in to change notification settings - Fork 189
cnc‐ddraw API
BOOL DDIsWindowed()
Returns TRUE if the application is currently running in windowed mode
Note: Borderless counts as fullscreen
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
void DDEnableZoom()
DDEnableZoom must be called before each SetDisplayMode call to allow zooming (Change application resolution without altering the window size)
BOOL GameHandlesClose
If enabled, cnc-ddraw will not _exit(0) on SC_CLOSE (Same as game_handles_close= in ddraw.ini)
void* pvBmpBits
Pointer to DIB bit values of the fake primary surface (Currently only used for Warcraft II screen recorder)
#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)
#define WM_TOGGLE_MAXIMIZE WM_APP+118
PostMessageA(hwnd, WM_TOGGLE_MAXIMIZE , 0, 0);
Maximize window (Same as Alt+PageDown)