function OnResizeEvent(){
RECT r;
//Replace the sizing border
video_window(NULL, NULL, 4+16+32+64+128, 0);
GetClientRect(hWnd,&r);
video_set(r.right,r.bottom,0,0);
}
function OnMaximizeEvent(){
RECT r;
//Remove the sizing border without using video_window and set to open maximized
SetWindowLong(hWnd, GWL_STYLE, WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_MAXIMIZE);
//Activate the last change from above
SetWindowPos(hWnd, NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED);
GetClientRect(hWnd,&r);
video_set(r.right,r.bottom,0,0);
}