Implementing first part of Windows version of "GLUT_CAPTIONLESS" and "GLUT_BORDERLESS" per feature request "[ 1197016 ] need GLUT_CAPTIONLESS window option". Needs more work; menus are slightly mispositioned, X11 version does not support it, banner appears at beginning but disappears on window resize. But this is a start.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@723 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
f5cd6eb893
commit
9fffa516e3
@ -169,6 +169,8 @@
|
|||||||
#define GLUT_MULTISAMPLE 0x0080
|
#define GLUT_MULTISAMPLE 0x0080
|
||||||
#define GLUT_STEREO 0x0100
|
#define GLUT_STEREO 0x0100
|
||||||
#define GLUT_LUMINANCE 0x0200
|
#define GLUT_LUMINANCE 0x0200
|
||||||
|
#define GLUT_CAPTIONLESS 0x0400
|
||||||
|
#define GLUT_BORDERLESS 0x0800
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GLUT API macro definitions -- windows and menu related definitions
|
* GLUT API macro definitions -- windows and menu related definitions
|
||||||
|
@ -608,6 +608,7 @@ void fgOpenWindow( SFG_Window* window, const char* title,
|
|||||||
DWORD flags;
|
DWORD flags;
|
||||||
DWORD exFlags = 0;
|
DWORD exFlags = 0;
|
||||||
ATOM atom;
|
ATOM atom;
|
||||||
|
int WindowStyle = 0;
|
||||||
|
|
||||||
/* Grab the window class we have registered on glutInit(): */
|
/* Grab the window class we have registered on glutInit(): */
|
||||||
atom = GetClassInfo( fgDisplay.Instance, _T("FREEGLUT"), &wc );
|
atom = GetClassInfo( fgDisplay.Instance, _T("FREEGLUT"), &wc );
|
||||||
@ -735,6 +736,25 @@ void fgOpenWindow( SFG_Window* window, const char* title,
|
|||||||
0, 0, 0, 0,
|
0, 0, 0, 0,
|
||||||
SWP_NOMOVE | SWP_NOSIZE
|
SWP_NOMOVE | SWP_NOSIZE
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/* Hack to remove the caption (title bar) and/or border
|
||||||
|
* and all the system menu controls.
|
||||||
|
*/
|
||||||
|
WindowStyle = GetWindowLong(window->Window.Handle, GWL_STYLE);
|
||||||
|
if ( fgState.DisplayMode & GLUT_CAPTIONLESS )
|
||||||
|
{
|
||||||
|
SetWindowLong ( window->Window.Handle, GWL_STYLE,
|
||||||
|
WindowStyle & ~(WS_DLGFRAME | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX));
|
||||||
|
}
|
||||||
|
else if ( fgState.DisplayMode & GLUT_BORDERLESS )
|
||||||
|
{
|
||||||
|
SetWindowLong ( window->Window.Handle, GWL_STYLE,
|
||||||
|
WindowStyle & ~(WS_BORDER | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX));
|
||||||
|
}
|
||||||
|
//SetWindowPos(window->Window.Handle, NULL, 0, 0, 0, 0,
|
||||||
|
// SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED);
|
||||||
|
|
||||||
|
|
||||||
#if defined(_WIN32_WCE)
|
#if defined(_WIN32_WCE)
|
||||||
ShowWindow( window->Window.Handle, SW_SHOW );
|
ShowWindow( window->Window.Handle, SW_SHOW );
|
||||||
#else
|
#else
|
||||||
|
Reference in New Issue
Block a user