added minimize button, disabling close button since we have no mechnism to notify the user of a close

This commit is contained in:
Brian Matzon 2003-02-08 01:02:34 +00:00
parent 247be0d0d2
commit f05f16cc27
1 changed files with 5 additions and 1 deletions

View File

@ -305,7 +305,7 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_Display_nCreate
windowflags = WS_POPUP | WS_VISIBLE;
} else {
exstyle = 0;
windowflags = WS_OVERLAPPED | WS_BORDER | WS_CAPTION | WS_VISIBLE;
windowflags = WS_OVERLAPPED | WS_BORDER | WS_CAPTION | WS_VISIBLE | WS_MINIMIZEBOX | WS_SYSMENU;
}
isFullscreen = fullscreen == JNI_TRUE;
@ -342,6 +342,10 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_Display_nCreate
NULL);
env->ReleaseStringUTFChars(title, titleString);
// Disable close button
HMENU SysMen = GetSystemMenu(hwnd, false);
EnableMenuItem(SysMen, SC_CLOSE, MF_BYCOMMAND | MF_DISABLED);
// And we never look at windowClass again...
ShowWindow(hwnd, SW_SHOWNORMAL);