+ {
+ DWORD windowStyle;
+
+ if (fgStructure.CurrentWindow && fgStructure.CurrentWindow->Window.Handle)
+ windowStyle = GetWindowLong(fgStructure.CurrentWindow->Window.Handle, GWL_STYLE);
+ else
+ /* If no window, return sizes for a default window with title bar and border */
+ windowStyle = WS_OVERLAPPEDWINDOW;
+
+ switch( eWhat )
+ {
+ case GLUT_WINDOW_BORDER_WIDTH:
+ {
+ int xBorderWidth, yBorderWidth;
+ fghGetBorderWidth(windowStyle, &xBorderWidth, &yBorderWidth);
+ return xBorderWidth;
+ }
+ case GLUT_WINDOW_HEADER_HEIGHT:
+ /* Need to query for WS_MAXIMIZEBOX to see if we have a title bar, the WS_CAPTION query is also true for a WS_DLGFRAME only... */
+ return (windowStyle & WS_MAXIMIZEBOX)? GetSystemMetrics( SM_CYCAPTION ) : 0;
+ }
+ }