Hi.
I've made this, because I like full-screen games, and standard AppGameKit functions doesn't support doing fullscreen.
I've split it all into one function, allowing you to resize your application during play, or put it into fullscreen. (!)
All in one function.
Check it out:
void SetFullScreen(int fullscreen, char* window_title, int width, int height)
{
HWND hWnd = FindWindow("OPENGLWINDOW",window_title);
if(fullscreen == 1)
{
RECT rc;
GetWindowRect(GetDesktopWindow(), &rc);
SetWindowLongPtr(hWnd, GWL_STYLE, WS_SYSMENU | WS_POPUP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_VISIBLE);
MoveWindow(hWnd, 0, 0, rc.right, rc.bottom, TRUE);
} else {
RECT rc;
GetWindowRect(GetDesktopWindow(), &rc);
RECT rect;
rect.left = 0;
rect.top = 0;
rect.right = width;
rect.bottom = height;
SetWindowLongPtr(hWnd, GWL_STYLE, WS_OVERLAPPEDWINDOW & (~WS_SIZEBOX) | WS_VISIBLE);
AdjustWindowRect(&rect, WS_OVERLAPPEDWINDOW & (~WS_SIZEBOX), FALSE);
MoveWindow(hWnd, rc.right/2-width/2, rc.bottom/2-height/2, rect.right-rect.left, rect.bottom-rect.top, TRUE);
}
}
You have to provide if you want it windowed(0) or not(1), window title (always), then width and height (matters only if you go with windowed).
Have fun.