#include <windows.h>
typedef void *HMONITOR;
typedef struct tagMONITORINFO
{
DWORD cbSize;
RECT rcMonitor;
RECT rcWork;
DWORD dwFlags;
} MONITORINFO;
long WINAPI MonitorFromWindow(long hwnd,long dwFlags);
#define PRAGMA_API MonitorFromWindow;user32!MonitorFromWindow
#define MONITOR_DEFAULTTONULL 0x00000000
#define MONITOR_DEFAULTTOPRIMARY 0x00000001
#define MONITOR_DEFAULTTONEAREST 0x00000002
function main()
{
wait(1); // You need to wait 1 because the engine window is created here (which is needed to get the monitor)...
MONITORINFO info;
memset(&info, 0, sizeof(MONITORINFO));
info.cbSize = sizeof(MONITORINFO);
HMONITOR primary = MonitorFromWindow(hWnd, MONITOR_DEFAULTTOPRIMARY);
GetMonitorInfo(primary, &info);
SetWindowPos(hWnd, HWND_TOP, info.rcWork.left, info.rcWork.top, info.rcWork.right - info.rcWork.left, info.rcWork.bottom - info.rcWork.top, SWP_SHOWWINDOW);
SetWindowText(hWnd, "Hotel California - Edit");
video_window(NULL, NULL, 1, NULL);
video_set(info.rcWork.right - info.rcWork.left, info.rcWork.bottom - info.rcWork.top, 32, 2);
}